Revoke a token (RFC 7009)
const url = 'https://dev-api.infiniteaudience.ai/v1/oauth/revoke';const options = { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({ token: 'example', token_type_hint: 'access_token', client_id: 'example', client_secret: 'example' })};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://dev-api.infiniteaudience.ai/v1/oauth/revoke \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data token=example \ --data token_type_hint=access_token \ --data client_id=example \ --data client_secret=exampleClient-authenticated, same credentials as /v1/oauth/token. Call this when your user disconnects the integration. Always returns 200 with an empty body regardless of whether the presented token was valid, except when client authentication itself fails — there is nothing to distinguish for a caller who might be probing for valid tokens (RFC 7009 §2.2).
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Responses
Section titled “Responses”Returned once the client itself authenticated, regardless of whether the presented token was valid.
object
Examplegenerated
{}RFC 6749-shaped OAuth protocol error — error is a fixed machine-readable code and error_description is a human-readable detail. Deliberately NOT this API’s usual {error, code, message} shape — this is the RFC’s own error contract, used only by /v1/oauth/authorize, /v1/oauth/token, and /v1/oauth/revoke.
RFC 6749 §5.2 / §4.1.2.1 error body — see the OAuthError response component.
object
Example
{ "error": "invalid_request"}