Skip to main content

credentials

Creates, updates, deletes, gets or lists a credentials resource.

Overview

Namecredentials
TypeResource
Idgithub.credentials.credentials

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
revokeexeccredentialsSubmit 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.

This endpoint currently accepts the following credential types:
- Personal access tokens (classic) (ghp_)
- Fine-grained personal access tokens (github_pat_)
- OAuth app access tokens (gho_)
- User-to-server tokens from GitHub Apps (ghu_)
- Refresh tokens from GitHub Apps (ghr_)


Revoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users.
GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated.

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

> [!NOTE]
> Any authenticated requests will return a 403.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription

Lifecycle Methods

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.

This endpoint currently accepts the following credential types:
- Personal access tokens (classic) (ghp_)
- Fine-grained personal access tokens (github_pat_)
- OAuth app access tokens (gho_)
- User-to-server tokens from GitHub Apps (ghu_)
- Refresh tokens from GitHub Apps (ghr_)


Revoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users.
GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated.

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

> [!NOTE]
> Any authenticated requests will return a 403.

EXEC github.credentials.credentials.revoke 
@@json=
'{
"credentials": "{{ credentials }}"
}'
;