Results per page (max 100)
Default:30
Page number of the results to fetch.
Default:1
The client ID of your GitHub app.
Deprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the list your authorizations API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on the application authorizations settings screen within GitHub. The scopes
returned are the union of scopes authorized for the application. For example, if an application has one token with repo
scope and another token with user
scope, the grant will return ["repo", "user"]
.
Results per page (max 100)
Default:30
Page number of the results to fetch.
Default:1
The client ID of your GitHub app.
Response
The authorization associated with an OAuth Access.
Example:1
Example:https://api.github.com/applications/grants/1
Example:2011-09-06T17:26:27Z
Example:2011-09-06T20:39:23Z
Example:["public_repo"]
Simple User
Deprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
grant_id parameter
Response
The authorization associated with an OAuth Access.
Example:1
Example:https://api.github.com/applications/grants/1
Example:2011-09-06T17:26:27Z
Example:2011-09-06T20:39:23Z
Example:["public_repo"]
Simple User
Deprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
Deleting an OAuth application’s grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on the application authorizations settings screen within GitHub.
grant_id parameter
Response
Deprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
Results per page (max 100)
Default:30
Page number of the results to fetch.
Default:1
The client ID of your GitHub app.
Response
The authorization for an OAuth app, GitHub App, or a Personal Access Token.
A list of scopes that this authorization is in.
Simple User
Deprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
Warning: Apps must use the web application flow to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the blog post.
Creates OAuth tokens using Basic Authentication. If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see “Working with two-factor authentication.”
To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app’s client ID and secret, found on your OAuth application’s settings page. If your OAuth application intends to create multiple tokens for one user, use fingerprint
to differentiate between them.
You can also create tokens on GitHub Enterprise Server from the personal access tokens settings page. Read more about these tokens in the GitHub Help documentation.
Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in the GitHub Help documentation.
A list of scopes that this authorization is in.
Example:["public_repo","user"]
A note to remind you what the OAuth token is for.
Example:Update all gems
A URL to remind you what app the OAuth token is for.
The OAuth app client key for which to create the token.
<= 20 characters
The OAuth app client secret for which to create the token.
<= 40 characters
A unique string to distinguish an authorization from others created for the same client ID and user.
Response
The authorization for an OAuth app, GitHub App, or a Personal Access Token.
A list of scopes that this authorization is in.
Simple User