Get OAuth2 Access Token
Returns the current access token for an OAuth2 secret, refreshing it automatically if expired
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Returns the current access token for an OAuth2 secret, refreshing it automatically if expired
GET /v1/secrets/:id/oauth2/token
| Parameter | Type | Description |
|---|---|---|
id | uuid | The secret ID (must be an OAuth2-type secret) |
| Parameter | Type | Default | Description |
|---|---|---|---|
environment | string | Base environment | Target a specific environment |
{
"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" }
}
| Status | Type | Description |
|---|---|---|
| 400 | invalid_type | Secret is not an OAuth2 type |
| 404 | not_found | Secret not found |
| 500 | token_error | Failed to retrieve or refresh the OAuth2 token |
Was this page helpful?