Skip to main content
POST
/
oauth
/
token
curl --request POST \ --url https://api.zenzap.co/oauth/token \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data grant_type=client_credentials \ --data client_id=b@660e8400-e29b-41d4-a716-446655440003 \ --data client_secret=very-long-random-secret
{ "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "token_type": "Bearer", "expires_in": 3600, "scope": "channel:list message:send" }

Documentation Index

Fetch the complete documentation index at: https://docs.zenzap.co/llms.txt

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

Body

application/x-www-form-urlencoded
grant_type
enum<string>
required

OAuth 2.0 grant type. Only client_credentials is supported.

Available options:
client_credentials
client_id
string

The bot's OAuth clientId (returned when the bot was created or rotated). Omit if you authenticate via HTTP Basic Auth.

Example:

"b@660e8400-e29b-41d4-a716-446655440003"

client_secret
string

The bot's OAuth clientSecret. Omit if you authenticate via HTTP Basic Auth.

Example:

"very-long-random-secret"

scope
string

Space-separated list of OAuth scopes to request. Optional — if omitted, the issued token receives every scope the bot was granted at creation. Passing a scope the bot was not granted will fail with invalid_grant.

Example:

"channel:list message:send"

Response

Access token issued

access_token
string
required

JWT bearer token. Pass as Authorization: Bearer <access_token> on every API request.

token_type
enum<string>
required

Always Bearer.

Available options:
Bearer
expires_in
integer<int64>
required

Token lifetime in seconds (default 3600 = 1 hour).

Example:

3600

scope
string

Space-separated list of scopes granted to this token.

Example:

"channel:list message:send"