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.json) і подається англійською, як у самому API.Тіло запиту
| Поле | Тип | Обов’язк. | Опис |
|---|---|---|---|
code | string | так | One-time code from Desk (Settings > Extension), like ABCD-EFGH-JKLM. Valid for 10 minutes. |
device | string | ні | Device name shown in Desk, e.g. "Chrome". |
Відповіді
200
The key and the tenant.
application/json · Схема: ExtensionExchangeResponse
| Поле | Тип | Обов’язк. | Опис |
|---|---|---|---|
api_key | string | так | API key rv_live_…; shown once, store it in chrome.storage.local. |
key_prefix | string | так | |
scopes | string[] | так | |
tenant | object | так | |
tenant.id | string (uuid) | так | |
tenant.slug | string | так | |
tenant.name | string | так | |
tenant.plan | "trial" | "starter" | "pro" | "business" | так | |
tenant.country | string | так | |
tenant.currency | string | так | |
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