Apps

Revoke a token

Revokes an access token or a refresh token (RFC 7009). Revoking a refresh token that hasn't ended or expired ends the app's grant, even one a later refresh replaced. A token Marfa doesn't know returns 200 too.

POST
/oauth/revoke

Request body

application/x-www-form-urlencoded
  1. body
token*string

The access token or refresh token to revoke.

token_type_hint?string

Which kind of token token is. Marfa reads the token either way.

Value in"access_token""refresh_token"
client_id*string

The client ID the token was issued to.

Response body

About errors

Returns an empty object. The token no longer works.

application/json
  1. response

An error in the shape RFC 7009 defines:

  • invalid_request: token or client_id is missing.
application/json
  1. response
error*"invalid_request"

The OAuth error code.

Value in"invalid_request"
error_description?string

A description of the error for a person to read.

An error in the shape RFC 6749 defines:

  • invalid_client: the client_id names no client, or the request authenticates the client, which a public client doesn't.
application/json
  1. response

An OAuth error in the shape RFC 6749 defines, for a client Marfa does not accept.

error*"invalid_client"

The OAuth error code.

Value in"invalid_client"
error_description?string

A description of the error for a person to read.

request_timeout: the request body didn't arrive whole within 180 seconds. Nothing changed, and Marfa closed the connection. Send the request again. A body larger than about 21 MiB can't arrive in that time over a 1 Mbit/s link, so send it in smaller requests.

application/json
  1. response

An error response.

error*

What went wrong.

contract_mismatch: X-Marfa-Contract names another contract version than this instance speaks, or is not a whole number. Nothing was done.

application/json
  1. response

An error response.

error*

What went wrong.

request_too_large: the request body is larger than this instance accepts.

application/json
  1. response

An error response.

error*

What went wrong.

rate_limited: you sent too many requests. Wait for the number of seconds in Retry-After, then try again.

application/json
  1. response

An error response.

error*

What went wrong.

internal_error: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write.

application/json
  1. response

An error response.

error*

What went wrong.

write_contention: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. While a restore runs, details.reason is restore_running.

application/json
  1. response

An error response.

error*

What went wrong.

curl -X POST 'http://localhost:8600/oauth/revoke' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'token=string&client_id=string'
About errors
{}