API Reference
Auto-generated
Oauth
API reference for oauth endpoints.
Auto-generated
This page was generated from the OpenAPI spec. Run
make generate-docs to refresh after spec changes.GET /api/v1/oauth/authorize
GET
/api/v1/oauth/authorizeOauth Authorize Browser Redirect
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/oauth/authorize \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
JSON
{
"status": "ok"
}GET /api/v1/oauth/consent-context
GET
/api/v1/oauth/consent-contextOauth Consent Context
Request Example
Bash
curl -X GET https://api.alterlab.io/api/v1/oauth/consent-context \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json"Response Example
JSON
{
"client_id": "example",
"client_name": "example",
"verified": true,
"scopes": [],
"account_email": "example",
"default_spend_cap_microcents": 0
}POST /api/v1/oauth/register
POST
/api/v1/oauth/registerOauth Register
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| client_name | string | Optional | client_name |
| client_uri | string | Optional | client_uri |
| application_type | "web" | "native" | Optional | Application TypeDefault: web |
| redirect_uris | string[] | Required | Redirect Uris |
| grant_types | string[] | Optional | Grant Types |
| response_types | string[] | Optional | Response Types |
| token_endpoint_auth_method | "none" | "client_secret_basic" | "client_secret_post" | Optional | Token Endpoint Auth MethodDefault: client_secret_basic |
| scope | string | Optional | ScopeDefault: scrape |
| software_id | string | Optional | software_id |
| software_version | string | Optional | software_version |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/oauth/register \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"application_type": "...",
"redirect_uris": []
}'Response Example
JSON
{
"status": "ok"
}POST /api/v1/oauth/revoke
POST
/api/v1/oauth/revokeOauth Revoke
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| token | string | Required | Token |
| token_type_hint | string | Optional | token_type_hint |
| client_id | string | Optional | client_id |
| client_secret | string | Optional | client_secret |
Request Example
Bash
curl -X POST https://api.alterlab.io/api/v1/oauth/revoke \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"token": "example_token"
}'Response Example
JSON
{
"status": "ok"
}