Exchange client credentials for an access token
OAuth 2.0 client credentials grant. Returns a Bearer token that must be
included in the Authorization header of all authenticated requests.
Token-based auth with expiry. A partner's access can be revoked immediately
(contract termination, abuse). Invalid or expired tokens return clear errors.
Body·
required
application/json
- Type: stringclient
_id requiredClient ID issued to the partner
- Type: stringclient
_secret requiredClient secret issued to the partner
- enumgrant
_type const:client_credentialsrequired
Responses
- application/json
- application/json
- application/json
Request Example for post/auth/token
curl https://SERVER_NAME_GOES_HERE.menu.app/auth/token \
--request POST \
--header 'Content-Type: application/json' \
--data '{
"client_id": "partner-abc-client-id",
"client_secret": "partner-abc-client-secret",
"grant_type": "client_credentials"
}'
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 2591999,
"token_type": "Bearer"
}