Use the REST API to interact with OAuth apps and OAuth authorizations of GitHub Apps
You can use these endpoints to manage the OAuth tokens that OAuth apps or GitHub Apps use to access people's accounts on GitHub.
Tokens for OAuth apps have the prefix gho_, while OAuth tokens for GitHub Apps, used for authenticating on behalf of the user, have the prefix ghu_. You can use the following endpoints for both types of OAuth tokens.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
DELETE /applications/{client_id}/grant
OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth access_token as an input parameter and the grant for the token's owner will be deleted.
Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on the application authorizations settings screen within GitHub.
Note
This endpoint requires Basic authentication. Use the application's client_id as the username and the client_secret as the password. Do not send an Authorization: Bearer header with this request, because it replaces the Basic credentials.
accept (string)application/vnd.github+json is recommended.client_id (string) (required)access_token (string) (required)204 - No Content
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X DELETE \
https://api.github.com/applications/Iv1.8a61f9b3a7aba766/grant \
-u "<YOUR_CLIENT_ID>:<YOUR_CLIENT_SECRET>" \
-d '{
"access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a"
}'
Response schema (Status: 204):
POST /applications/{client_id}/token
OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return 404 NOT FOUND.
Note
This endpoint requires Basic authentication. Use the application's client_id as the username and the client_secret as the password. Do not send an Authorization: Bearer header with this request, because it replaces the Basic credentials.
accept (string)application/vnd.github+json is recommended.client_id (string) (required)access_token (string) (required)200 - OK
404 - Resource not found
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X POST \
https://api.github.com/applications/Iv1.8a61f9b3a7aba766/token \
-u "<YOUR_CLIENT_ID>:<YOUR_CLIENT_SECRET>" \
-d '{
"access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a"
}'
Response schema (Status: 200):
id: required, integer, format: int64url: required, string, format: uriscopes: required, array of string or nulltoken: required, stringtoken_last_eight: required, string or nullhashed_token: required, string or nullapp: required, object:
client_id: required, stringname: required, stringurl: required, string, format: urinote: required, string or nullnote_url: required, string or null, format: uriupdated_at: required, string, format: date-timecreated_at: required, string, format: date-timefingerprint: required, string or nulluser: any of:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringinstallation: any of:
permissions: required, App Permissions:
actions: string, enum: read, writeadministration: string, enum: read, writeartifact_metadata: string, enum: read, writeattestations: string, enum: read, writechecks: string, enum: read, writecode_quality: string, enum: read, writecodespaces: string, enum: read, writecontents: string, enum: read, writedependabot_secrets: string, enum: read, writedeployments: string, enum: read, writediscussions: string, enum: read, writeenvironments: string, enum: read, writeissues: string, enum: read, writemerge_queues: string, enum: read, writemetadata: string, enum: read, writepackages: string, enum: read, writepages: string, enum: read, writepull_requests: string, enum: read, writerepository_custom_properties: string, enum: read, writerepository_hooks: string, enum: read, writerepository_projects: string, enum: read, write, adminsecret_scanning_alerts: string, enum: read, writesecrets: string, enum: read, writesecurity_events: string, enum: read, writesingle_file: string, enum: read, writestatuses: string, enum: read, writevulnerability_alerts: string, enum: read, writeworkflows: string, enum: writecustom_properties_for_organizations: string, enum: read, writemembers: string, enum: read, writeorganization_administration: string, enum: read, writeorganization_custom_roles: string, enum: read, writeorganization_custom_org_roles: string, enum: read, writeorganization_custom_properties: string, enum: read, write, adminorganization_copilot_seat_management: string, enum: read, writeorganization_copilot_agent_settings: string, enum: read, writeorganization_copilot_requests: string, enum: readorganization_external_properties_for_repos: string, enum: read, write, adminorganization_announcement_banners: string, enum: read, writeorganization_events: string, enum: readorganization_hooks: string, enum: read, writeorganization_personal_access_tokens: string, enum: read, writeorganization_personal_access_token_requests: string, enum: read, writeorganization_plan: string, enum: readorganization_projects: string, enum: read, write, adminorganization_packages: string, enum: read, writeorganization_secrets: string, enum: read, writeorganization_self_hosted_runners: string, enum: read, writeorganization_user_blocking: string, enum: read, writeemail_addresses: string, enum: read, writefollowers: string, enum: read, writegit_ssh_keys: string, enum: read, writegpg_keys: string, enum: read, writeinteraction_limits: string, enum: read, writeprofile: string, enum: writestarring: string, enum: read, writeenterprise_custom_properties_for_organizations: string, enum: read, write, adminrepository_selection: required, string, enum: all, selectedsingle_file_name: required, string or nullhas_multiple_single_files: booleansingle_file_paths: array of stringrepositories_url: required, string, format: uriaccount: required, Simple User (see above)expires_at: required, string or null, format: date-timePATCH /applications/{client_id}/token
OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return 404 NOT FOUND.
Note
This endpoint requires Basic authentication. Use the application's client_id as the username and the client_secret as the password. Do not send an Authorization: Bearer header with this request, because it replaces the Basic credentials.
accept (string)application/vnd.github+json is recommended.client_id (string) (required)access_token (string) (required)200 - OK
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X PATCH \
https://api.github.com/applications/Iv1.8a61f9b3a7aba766/token \
-u "<YOUR_CLIENT_ID>:<YOUR_CLIENT_SECRET>" \
-d '{
"access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a"
}'
Response schema (Status: 200):
Same response schema as Check a token.
DELETE /applications/{client_id}/token
OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization.
Note
This endpoint requires Basic authentication. Use the application's client_id as the username and the client_secret as the password. Do not send an Authorization: Bearer header with this request, because it replaces the Basic credentials.
accept (string)application/vnd.github+json is recommended.client_id (string) (required)access_token (string) (required)204 - No Content
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X DELETE \
https://api.github.com/applications/Iv1.8a61f9b3a7aba766/token \
-u "<YOUR_CLIENT_ID>:<YOUR_CLIENT_SECRET>" \
-d '{
"access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a"
}'
Response schema (Status: 204):