Skip to navigation

Revoke an access token

Revokes one of your application’s own access tokens, as defined by RFC 7009.

Request

Send token, the evpa_live_… or evpa_test_… access token to revoke, as application/x-www-form-urlencoded or as JSON. token_type_hint is a hint only. Authenticate the client exactly as at the token endpoint: client_secret_basic, client_secret_post or private_key_jwt. See requesting tokens.

What happens

Only the authenticated application’s own token is revoked. Revocation takes effect from the next request, and realtime connections the token opened are closed with SESSION_REVOKED. Your application can revoke its own tokens even while it is disabled or its agency is suspended.

Response

The answer is 200 with an empty body for anything that is not a client error: the token was revoked now, was already revoked, has expired, is unknown, or belongs to another application (which is left untouched).

Errors

  • 400 invalid_request — a parameter sent twice, too long or in the URL query, more than one client authentication method, client_secret without client_id, or client_assertion without client_assertion_type.
  • 400 INVALID_REQUEST — the body has no token, or its token does not start with evpa_, so it is not a revocation of your token. This answer uses the common Error envelope.
  • 401 invalid_client — client authentication failed. The answer is the same constant in every case, with WWW-Authenticate: Basic when you used HTTP Basic.
  • 401 UNAUTHORIZED — a JSON body with client_id and client_secret whose token does not start with evpa_. This answer uses the common Error envelope.
  • 503 temporarily_unavailable — EVVA cannot answer right now. Retry after Retry-After.

Authentication

AuthorizationBasic

Client authentication at the token and revocation endpoints with the client id and secret (client_secret_basic, RFC 6749, section 2.3.1). client_secret_post and private_key_jwt send the credentials in the form body instead.

Request

This endpoint expects an object.
tokenstringRequired1-4096 characters
token_type_hintstringOptional
client_idstringOptional
client_secretstringOptional
client_assertion_type"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"Optional
client_assertionstringOptional

Response

Revoked, or nothing to revoke. The body is empty (RFC 7009, section 2.2).

Errors

400
Bad Request Error
401
Unauthorized Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error