{"meta":{"title":"Revocación","intro":"Use la API REST para revocar las credenciales que ha encontrado expuestas en GitHub o en cualquier otro lugar.","product":"REST API","breadcrumbs":[{"href":"/es/rest","title":"REST API"},{"href":"/es/rest/credentials","title":"Credenciales"},{"href":"/es/rest/credentials/revoke","title":"Revocación"}],"documentType":"article"},"body":"# Revocación\n\nUse la API REST para revocar las credenciales que ha encontrado expuestas en GitHub o en cualquier otro lugar.\n\n> [!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2022-11-28`. Curl examples below omit these standard headers for brevity.\n\n## Revoke a list of credentials\n\n```\nPOST /credentials/revoke\n```\n\nSubmit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation.\nThis endpoint currently accepts the following credential types:\n\nPersonal access tokens (classic) (ghp_)\nFine-grained personal access tokens (github_pat_)\nOAuth app access tokens (gho_)\nUser-to-server tokens from GitHub Apps (ghu_)\nRefresh tokens from GitHub Apps (ghr_)\n\nRevoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users.\nGitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated.\nTo prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request.\nNote\n\nAny authenticated requests will return a 403.\n\n### Parameters\n\n#### Headers\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Body parameters\n\n- **`credentials`** (array of strings) (required)\n  A list of credentials to be revoked, up to 1000 per request.\n\n### HTTP response status codes\n\n- **202** - Accepted\n\n- **422** - Validation failed, or the endpoint has been spammed.\n\n- **500** - Internal Error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/credentials/revoke \\\n  -d '{\n  \"credentials\": [\n    \"ghp_1234567890abcdef1234567890abcdef12345678\",\n    \"github_pat_0A1B2C3D4E5F6G7H8I9J0K_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456\",\n    \"gho_1234567890abcdef1234567890abcdef12345678\",\n    \"ghu_1234567890abcdef1234567890abcdef12345678\",\n    \"ghr_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab\"\n  ]\n}'\n```\n\n**Response schema (Status: 202):**\n\nobject"}