-
Notifications
You must be signed in to change notification settings - Fork 67.7k
Expand file tree
/
Copy pathcredentials.json
More file actions
71 lines (71 loc) · 3.76 KB
/
Copy pathcredentials.json
File metadata and controls
71 lines (71 loc) · 3.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
"revoke": [
{
"serverUrl": "https://api.github.com",
"verb": "post",
"requestPath": "/credentials/revoke",
"title": "Revoke a list of credentials",
"category": "credentials",
"subcategory": "revoke",
"parameters": [],
"bodyParameters": [
{
"type": "array of strings",
"name": "credentials",
"description": "<p>A list of credentials to be revoked, up to 1000 per request.</p>",
"isRequired": true
}
],
"descriptionHTML": "<p>Submit 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.</p>\n<p>This endpoint currently accepts the following credential types:</p>\n<ul>\n<li>Personal access tokens (classic) (<code>ghp_</code>)</li>\n<li>Fine-grained personal access tokens (<code>github_pat_</code>)</li>\n<li>OAuth app access tokens (<code>gho_</code>)</li>\n<li>User-to-server tokens from GitHub Apps (<code>ghu_</code>)</li>\n<li>Refresh tokens from GitHub Apps (<code>ghr_</code>)</li>\n</ul>\n<p>Revoked 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.</p>\n<p>To prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request.</p>\n<div class=\"ghd-alert ghd-alert-accent\" data-container=\"alert\"><p class=\"ghd-alert-title\"><svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon mr-2\" aria-hidden><path d=\"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z\"></path></svg>Note</p>\n<p>\nAny authenticated requests will return a 403.</p>\n</div>",
"codeExamples": [
{
"request": {
"contentType": "application/json",
"description": "Example",
"acceptHeader": "application/vnd.github.v3+json",
"bodyParameters": {
"credentials": [
"ghp_1234567890abcdef1234567890abcdef12345678",
"github_pat_0A1B2C3D4E5F6G7H8I9J0K_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456",
"gho_1234567890abcdef1234567890abcdef12345678",
"ghu_1234567890abcdef1234567890abcdef12345678",
"ghr_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab"
]
}
},
"response": {
"statusCode": "202",
"contentType": "application/json",
"description": "<p>Accepted</p>",
"example": null,
"schema": {
"type": "object"
}
}
}
],
"statusCodes": [
{
"httpStatusCode": "202",
"description": "<p>Accepted</p>"
},
{
"httpStatusCode": "422",
"description": "<p>Validation failed, or the endpoint has been spammed.</p>"
},
{
"httpStatusCode": "500",
"description": "<p>Internal Error</p>"
}
],
"previews": [],
"progAccess": {
"userToServerRest": false,
"serverToServer": false,
"fineGrainedPat": false,
"permissions": [],
"allowPermissionlessAccess": true
}
}
]
}