M2M Tokens
Revoke a M2M Token
Revokes a M2M Token.
This endpoint only revokes stored opaque-format M2M tokens. JWT-format M2M tokens are stateless and cannot be revoked.
This endpoint can be authenticated by either a Machine Secret Key or by a Clerk Secret Key.
- When revoking a M2M Token with a Machine Secret Key, the token must managed by the Machine associated with the Machine Secret Key.
- When revoking a M2M Token with a Clerk Secret Key, any token on the Instance can be revoked.
post/m2m_tokens/{m2m_token_id}/revoke
Path parameters
m2m_token_idstring required
Request body
Response
200 OK
Example response
{
"id": "mt_f7f0ba8c3b4843ce7d85fcdd5e71853e",
"subject": "mch_2xhFjEI5X2qWRvtV13BzSj8H6Dk",
"claims": {
"important_metadata": "Some useful data"
},
"scopes": [
"mch_2xhFjEI5X2qWRvtV13BzSj8H6Dk",
"mch_2yGkLpQ7Y3rXSwtU24CzTk9I7Em"
],
"revocation_reason": "Revoked by user",
"expiration": 1716883200000,
"last_used_at": 1716883200000,
"created_at": 1716883200000,
"updated_at": 1716883200000
}