Skip to main content

Revoke an access token

POST /v2/oauth/token/revoke

Revokes an access token issued by an OAuth application. In the request body, include the token you want revoked, along with the client_id and client_secret of the application that issued it.

If you clone the application that issued the token, then the clone's credentials can’t be used to revoke it. To revoke the token, you must pass the credentials of the application that issued it.

Warning

To reduce the risk of your client credentials being compromised, always send them in the request body. If you pass your credentials as query parameters, Instacart returns an error with a 403 status code.

Security

None.

Parameters

None.

Request

FieldTypeRequiredDescription
client_idstringRequiredThe client ID.
client_secretstringRequiredThe client secret.
tokenstringRequiredThe token to revoke.

Request examples

curl --request POST \
--url https://connect.instacart.com/v2/oauth/token/revoke \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"client_id": "string",
"client_secret": "string",
"token": "string"
}'

Response

None.

Response examples

200 Success

{
// Empty
}

Authentication Errors

HTTP CodeCauseErrorDescription
403Unauthorized client"unauthorized_client""You are not authorized to revoke this token"
403Query Params Forbidden"query_params_forbidden""Providing OAuth credentials as query parameters may cause them to be compromised. Please reach out to Instacart's security team and have the credentials rotated."