Developer API

Authentication

API использует Grik account identity для управления ключами и scoped developer API keys для production integrations.

User tokens

Используйте device login для browserless clients, local Ricochet tooling и управления keys от имени account.

МетодEndpoint
POST/auth/device/code

Создает device code, user code, verification URL, срок действия и polling interval.

POST/auth/device/token

Меняет approved device code на access и refresh tokens.

POST/auth/refresh

Ротирует refresh token и выдает новый access token.

GET/users/me

Возвращает authenticated user profile для billing и ownership.

Developer API keys

Используйте API keys для production server-side integrations. Keys scoped и могут быть revoked.

МетодEndpoint
POST/auth/api-keys

Выпускает organization API key вида grik_live_... для server-side integrations.

GET/auth/api-keys

Показывает active и revoked API keys без raw secret.

DELETE/auth/api-keys/:id

Отзывает API key по id. Revoked keys сразу перестают проходить auth.