/oauth/revokeRevoke an access or refresh token
This operation is idempotent. It returns 200 {} whether or not the token was valid, which prevents token enumeration.
Request body
application/x-www-form-urlencoded
client_idstringThe OAuth application UID.
client_secretstringThe OAuth application secret.
tokenstringrequiredThe access or refresh token value to revoke.
token_type_hintstringThe type of token supplied in
token.Allowed values:
access_token | refresh_token
Responses
The token was revoked, or was already invalid.
valueobjectAn empty object returned whether or not the token was valid. This prevents token enumeration.
Example
{}The client credentials are invalid.
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}