Issue an OAuth access token
Exchanges OAuth client credentials for a short-lived bearer access token.
Only the client_credentials grant is supported on this endpoint. Use the clientId and clientSecret returned when the bot was created (or rotated) in your Zenzap admin console.
Client authentication: either send client_id + client_secret in the form body, or use HTTP Basic Auth with the same values (Authorization: Basic base64(clientId:clientSecret)).
Scopes: omit the scope field to receive a token with all scopes configured on the bot, or pass a space-separated subset to down-scope. Requesting a scope that the bot was not granted at creation will fail.
Token lifetime: 1 hour. There is no refresh token — re-mint with the client credentials when the token expires.
Tokens are JWTs bound to the issuing region and to the bot. They are validated on every request. See Authentication for the full reference.
Request
- Base URLhttps://api.zenzap.co
- Authnone required
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body application/x-www-form-urlencoded
Example request
{
"client_id": "b@660e8400-e29b-41d4-a716-446655440003",
"client_secret": "very-long-random-secret",
"scope": "channel:list message:send"
}Response
Access token issued
Example response
{
"expires_in": 3600,
"scope": "channel:list message:send"
}Changes
No recorded changes to this operation across all 1 revision of this API.