POST /oauth/revoke
From Social ID Developers
(Difference between revisions)
(→Authentication) |
(→Response Status) |
||
Line 53: | Line 53: | ||
|- | |- | ||
| invalid_client | | invalid_client | ||
− | | The request authentication is invalid (not given or combination do not match) | + | | The request authentication is invalid (not given or combination do not match). |
|- | |- | ||
| invalid_request | | invalid_request |
Latest revision as of 19:51, 27 January 2022
Contents |
Description
Revokes an access token or a refresh token.
If an access token is given, the associated refresh token is revoked as well and vice-versa.
See https://datatracker.ietf.org/doc/html/rfc7009 for more details on Token Revocation.
Resource URL
POST https://api.socialidnow.com/v2/marketing/oauth/revoke
Parameters
Form Url Encoded Parameters
token | required | access token or refresh token to be revoked. |
---|---|---|
token_type_hint | optional | type of the given token. Allowed values: access_token, refresh_token. Note: the token will be revoked even if the given token_type_hint does not match the actual token type. |
Authentication
This API requires Login App authentication. See Authentication.
Response
Response Status
ok (200) | The token was revoked successfully, or the token was invalid (i.e. not found, expired or already revoked). |
---|---|
bad_request (400) | Some required parameter was not informed. |
unauthorized (401) | The authentication is wrong. See Authentication. |
internal_server_error (500) | An unknown error happened. |
In case of error, one of of the following codes will be set in the JSON response. An error description will also be set accordingly.
Code | Description |
---|---|
invalid_client | The request authentication is invalid (not given or combination do not match). |
invalid_request | A required parameter was not informed (token). |
Examples
Request
curl -iX POST 'https://api.socialidnow.com/v2/marketing/oauth/revoke' \ -d token=45ghiukldjahdnhzdauz&token_type_hint=refresh_token \ --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
Response
Response Headers
HTTP/1.1 200 Ok Status: 200