Skip to main content
이제 REST API의 버전이 지정되었습니다. 자세한 내용은 "API 버전 관리 정보"를 참조하세요.

취소

REST API를 사용하여 GitHub 또는 다른 곳에서 노출된 자격 증명을 취소합니다.

Revoke a list of credentials

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. Credential owners will be notified of the revocation.

This endpoint currently accepts the following credential types:

  • classic personal access tokens
  • fine-grained personal access tokens

To prevent abuse, this API is limited to 60 authenticated requests per hour and a max of 1000 tokens per API request.

"Revoke a list of credentials"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:

세분화된 토큰에는 어떤 권한도 필요하지 않습니다.

"Revoke a list of credentials"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

Setting to application/vnd.github+json is recommended.

본문 매개 변수
속성, 형식, 설명
credentials array of strings Required

A list of credentials to be revoked, up to 1000 per request.

"Revoke a list of credentials"에 대한 HTTP 응답 상태 코드

상태 코드설명
202

Accepted

422

Validation failed, or the endpoint has been spammed.

500

Internal Error

"Revoke a list of credentials"에 대한 코드 샘플

요청 예제

post/credentials/revoke
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/credentials/revoke \ -d '{"credentials":["ghp_1234567890abcdef1234567890abcdef12345678","ghp_abcdef1234567890abcdef1234567890abcdef12"]}'

Accepted

Status: 202