Check a token
OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/[email protected]/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`.
/applications/{client_id}/token- Source
github-v3-rest.json- Revision
f5f067c1e6f6- Active snapshot
85e53e3d0d65
Request
Path Parameters
- client_id stringrequired
The client ID of your GitHub app.
Body Params
requiredThe access_token of the OAuth application.
Responses
Response
app objectrequired
installation Scoped Installation objectoptionalnullable
account Simple User objectrequiredSimple User
Simple User
Example: https://github.com/images/error/octocat_happy.gif
Example: https://api.github.com/users/octocat/events{/privacy}
Example: https://api.github.com/users/octocat/followers
Example: https://api.github.com/users/octocat/following{/other_user}
Example: https://api.github.com/users/octocat/gists{/gist_id}
Example: 41d064eb2195891e12d0413f63227ea7
Example: https://github.com/octocat
Example: 1
Example: octocat
Example: MDQ6VXNlcjE=
Example: https://api.github.com/users/octocat/orgs
Example: https://api.github.com/users/octocat/received_events
Example: https://api.github.com/users/octocat/repos
Example: "2020-07-09T00:17:55Z"
Example: https://api.github.com/users/octocat/starred{/owner}{/repo}
Example: https://api.github.com/users/octocat/subscriptions
Example: User
Example: https://api.github.com/users/octocat
Example: true
permissions App Permissions objectrequiredThe permissions granted to the user-to-server access token.
Example:{
"contents": "read",
"deployments": "write",
"issues": "read",
"single_file": "read"
}
The permissions granted to the user-to-server access token.
{
"contents": "read",
"deployments": "write",
"issues": "read",
"single_file": "read"
}The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`.
The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: `read` or `write`.
The level of permission to grant the access token for checks on code. Can be one of: `read` or `write`.
The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: `read` or `write`.
The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: `read` or `write`.
The level of permission to grant the access token for deployments and deployment statuses. Can be one of: `read` or `write`.
The level of permission to grant the access token for managing repository environments. Can be one of: `read` or `write`.
The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: `read` or `write`.
The level of permission to grant the access token for organization teams and members. Can be one of: `read` or `write`.
The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: `read` or `write`.
The level of permission to grant the access token to manage access to an organization. Can be one of: `read` or `write`.
The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: `read` or `write`.
The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: `read` or `write`.
The level of permission to grant the access token for viewing an organization's plan. Can be one of: `read`.
The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: `read`, `write`, or `admin`.
The level of permission to grant the access token to manage organization secrets. Can be one of: `read` or `write`.
The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: `read` or `write`.
The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: `read` or `write`.
The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: `read` or `write`.
The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: `read` or `write`.
The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: `read` or `write`.
The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: `read` or `write`.
The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: `read`, `write`, or `admin`.
The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: `read` or `write`.
The level of permission to grant the access token to manage repository secrets. Can be one of: `read` or `write`.
The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: `read` or `write`.
The level of permission to grant the access token to manage just a single file. Can be one of: `read` or `write`.
The level of permission to grant the access token for commit statuses. Can be one of: `read` or `write`.
The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`.
The level of permission to grant the access token to manage Dependabot alerts. Can be one of: `read` or `write`.
The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: `write`.
Example: https://api.github.com/users/octocat/repos
Describe whether all repositories have been selected or there's a selection involved
Example: config.yaml
[
"config.yml",
".github/issue_TEMPLATE.md"
]A list of scopes that this authorization is in.
user Simple User objectoptionalnullable Simple User
Simple User
Example: https://github.com/images/error/octocat_happy.gif
Example: https://api.github.com/users/octocat/events{/privacy}
Example: https://api.github.com/users/octocat/followers
Example: https://api.github.com/users/octocat/following{/other_user}
Example: https://api.github.com/users/octocat/gists{/gist_id}
Example: 41d064eb2195891e12d0413f63227ea7
Example: https://github.com/octocat
Example: 1
Example: octocat
Example: MDQ6VXNlcjE=
Example: https://api.github.com/users/octocat/orgs
Example: https://api.github.com/users/octocat/received_events
Example: https://api.github.com/users/octocat/repos
Example: "2020-07-09T00:17:55Z"
Example: https://api.github.com/users/octocat/starred{/owner}{/repo}
Example: https://api.github.com/users/octocat/subscriptions
Example: User
Example: https://api.github.com/users/octocat
Resource not found
Validation failed