Request an OAuth 2.0 access token
Exchange a Voidnet API key for a short-lived JWT access token using the `client_credentials` grant. The token is valid for a configurable TTL (default 1 hour) and can be used as a `Bearer` credential anywhere an API key is accepted. The `audience` is always the gateway issuer URL — no client-controlled audience is accepted.
/oauth/tokenExchange a Voidnet API key for a short-lived JWT access token using the client_credentials grant. The token is valid for a configurable TTL (default 1 hour) and can be used as a Bearer credential anywhere an API key is accepted. The audience is always the gateway issuer URL — no client-controlled audience is accepted.
Request Body
application/x-www-form-urlencoded
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/oauth/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'grant_type=string&client_id=string'{
"access_token": "string",
"expires_in": 0,
"scope": "string",
"token_type": "string"
}{
"error": "string",
"error_description": "string"
}{
"error": "string",
"error_description": "string"
}{
"error": "string",
"error_description": "string"
}{
"error": "string",
"error_description": "string"
}