Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.knoxcall.com/llms.txt

Use this file to discover all available pages before exploring further.

Get OAuth2 Access Token

GET /v1/secrets/:id/oauth2/token
For OAuth2-type secrets, returns the current access token. If the token has expired, KnoxCall will automatically refresh it before returning.

Path Parameters

ParameterTypeDescription
iduuidThe secret ID (must be an OAuth2-type secret)

Query Parameters

ParameterTypeDefaultDescription
environmentstringBase environmentTarget a specific environment

Response

{
  "data": {
    "access_token": "eyJhbGciOiJSUzI1NiIs...",
    "expires_at": "2026-03-10T15:30:00.000Z",
    "token_type": "Bearer",
    "connection_status": "connected"
  },
  "meta": { "request_id": "550e8400-e29b-41d4-a716-446655440000" }
}

Errors

StatusTypeDescription
400invalid_typeSecret is not an OAuth2 type
404not_foundSecret not found
500token_errorFailed to retrieve or refresh the OAuth2 token