# Revoke tokens Revoke an access token or refresh token. Once revoked, the token can no longer be used. Revoking a refresh token revokes all access tokens that were created using the same authorization. This endpoint can only be accessed using **OAuth client credentials**. > 🔑 Access with > > [OAuth access token](/reference/authentication) # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Mollie Connect", "version": "1.0.0", "license": { "name": "Attribution-NonCommercial-ShareAlike 4.0 International", "identifier": "CC-BY-NC-SA-4.0" } }, "servers": [ { "url": "https://api.mollie.com" } ], "security": [ { "apiKey": [] }, { "organizationAccessToken": [] }, { "oAuth": [] } ], "paths": { "/oauth2/tokens": { "servers": [ { "url": "https://api.mollie.com/oauth2" } ], "delete": { "security": [ { "oAuth": [] } ], "summary": "Revoke tokens", "x-speakeasy-name-override": "revoke", "tags": [ "OAuth API" ], "operationId": "oauth-revoke-tokens", "description": "Revoke an access token or refresh token. Once revoked, the token can no longer be used.\n\nRevoking a refresh token revokes all access tokens that were created using the same authorization.\n\nThis endpoint can only be accessed using **OAuth client credentials**.\n\n> 🔑 Access with\n>\n> [OAuth access token](/reference/authentication)", "parameters": [ { "name": "Authorization", "description": "The OAuth client ID and client secret as [basic access credentials](https://en.wikipedia.org/wiki/Basic_access_authentication).\n\nPseudo code: `\"Basic \" + toBase64(client_id + \":\" + client_secret)`\n\nFor example: `Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==`", "in": "header", "schema": { "type": "string" }, "required": true }, { "name": "Content-Type", "description": "This header value must match the type of the request body you send, if there is a request body. For example, if you send the request body as JSON, this header must be set to `application/json`, and if you send it as form encoded you must set this header to `application/x-www-form-urlencoded`.", "in": "header", "schema": { "type": "string" }, "required": false } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "token_type_hint": { "type": "string", "description": "The type of token you want to revoke.\n\nPossible values: `access_token` `refresh_token`" }, "token": { "type": "string", "description": "The token you want to revoke." } }, "required": [ "token_type_hint", "token" ] } } } }, "responses": { "204": { "description": "An empty response.", "content": { "application/hal+json": { "schema": {}, "example": {} } } } }, "x-readme": { "code-samples": [ { "language": "shell", "code": "curl -X DELETE https://api.mollie.com/oauth2/tokens \\\n -u app_j9Pakf56Ajta6Y65AkdTtAv:S5lTvMDTjl95HGnwYmsszDtbMp8QBE2lLcRJbD7I\n -d \"token_type_hint=refresh_token\" \\\n -d \"token=refresh_FS4xc3Mgci2xQ5s5DzaLXh3HhaTZOP\"" }, { "language": "php", "install": "composer require mollie/oauth2-mollie-php", "code": "/*\nWe don't have a PHP code example for this\nAPI call yet.\n\nIf you have some time to spare, feel free to\nshare suggestions on our Discord:\nhttps://discord.gg/VaTVkXB4aQ\n*/" }, { "language": "node", "code": "/*\nWe don't have a Node.js code example for this\nAPI call yet.\n\nIf you have some time to spare, feel free to\nshare suggestions on our Discord:\nhttps://discord.gg/VaTVkXB4aQ\n*/", "install": "npm install @mollie/api-client" }, { "language": "python", "code": "'''\nWe don't have a Python code example for this\nAPI call yet.\n\nIf you have some time to spare, feel free to\nshare suggestions on our Discord:\nhttps://discord.gg/VaTVkXB4aQ\n'''", "install": "pip install mollie-api-python" }, { "language": "ruby", "code": "# We don't have a Ruby code example for this\n# API call yet.\n#\n# If you have some time to spare, feel free to\n# share suggestions on our Discord:\n# https://discord.gg/VaTVkXB4aQ", "install": "gem install mollie-api-ruby" } ] } } } }, "components": { "securitySchemes": { "apiKey": { "type": "http", "scheme": "bearer", "x-default": "live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "organizationAccessToken": { "type": "http", "scheme": "bearer", "x-default": "access_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "oAuth": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://my.mollie.com/oauth2/authorize", "tokenUrl": "https://api.mollie.com/oauth2/tokens", "scopes": {} } } } } }, "x-readme": { "explorer-enabled": false, "samples-languages": [ "shell", "php", "node", "python", "ruby" ] } } ```