ImportOS · Документація
Довідник API

POST /v1/extension/exchange

Exchange a Desk one-time code for an API key (Chrome extension sign-in)

Exchange a Desk one-time code for an API key (Chrome extension sign-in)

Desk (Settings > Extension) shows a one-time code valid for 10 minutes. The extension sends it here and receives an API key (named "extension:<device>", scopes read:pricing, read:listings, write:deals) that is shown once. No Authorization header. The key can be revoked in Desk at any time. Attempts are limited service-wide to 60 per minute.

  • Автентифікація: Без автентифікації
Опис операції, параметрів і полів походить зі специфікації OpenAPI (openapi.json) і подається англійською, як у самому API.

Тіло запиту

ПолеТипОбов’язк.Опис
codestringтакOne-time code from Desk (Settings > Extension), like ABCD-EFGH-JKLM. Valid for 10 minutes.
devicestringніDevice name shown in Desk, e.g. "Chrome".

Відповіді

200

The key and the tenant.

application/json · Схема: ExtensionExchangeResponse

ПолеТипОбов’язк.Опис
api_keystringтакAPI key rv_live_…; shown once, store it in chrome.storage.local.
key_prefixstringтак
scopesstring[]так
tenantobjectтак
tenant.idstring (uuid)так
tenant.slugstringтак
tenant.namestringтак
tenant.plan"trial" | "starter" | "pro" | "business"так
tenant.countrystringтак
tenant.currencystringтак
tenant.locale"uk" | "pl" | "en"так

400

Invalid body, or the code is invalid, expired or already used (code invalid_code).

application/problem+json · Схема: Problem

401

Not returned by this endpoint (no Authorization header is used).

application/problem+json · Схема: Problem

403

The user who issued the code no longer has access to the tenant.

application/problem+json · Схема: Problem

429

Rate limit exceeded for the tenant plan (code rate_limited). Wait Retry-After seconds.

application/problem+json · Схема: Problem

На цій сторінці