Reset a token

PATCH {{baseUrl}}/applications/:client_id/token

OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.

Request Body

{"access_token"=>"<string>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{&quot;id&quot;:1,&quot;url&quot;:&quot;https://api.github.com/authorizations/1&quot;,&quot;scopes&quot;:[&quot;public_repo&quot;],&quot;token&quot;:&quot;abcdefgh12345678&quot;,&quot;token_last_eight&quot;:&quot;12345678&quot;,&quot;hashed_token&quot;:&quot;25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8&quot;,&quot;app&quot;:{&quot;url&quot;:&quot;http://my-github-app.com&quot;,&quot;name&quot;:&quot;my github app&quot;,&quot;client_id&quot;:&quot;abcde12345fghij67890&quot;},&quot;note&quot;:&quot;optional note&quot;,&quot;note_url&quot;:&quot;http://optional/note/url&quot;,&quot;updated_at&quot;:&quot;2011-09-06T20:39:23Z&quot;,&quot;created_at&quot;:&quot;2011-09-06T17:26:27Z&quot;,&quot;fingerprint&quot;:&quot;jklmnop12345678&quot;,&quot;user&quot;:{&quot;login&quot;:&quot;octocat&quot;,&quot;id&quot;:1,&quot;node_id&quot;:&quot;MDQ6VXNlcjE=&quot;,&quot;avatar_url&quot;:&quot;https://github.com/images/error/octocat_happy.gif&quot;,&quot;gravatar_id&quot;:&quot;&quot;,&quot;url&quot;:&quot;https://api.github.com/users/octocat&quot;,&quot;html_url&quot;:&quot;https://github.com/octocat&quot;,&quot;followers_url&quot;:&quot;https://api.github.com/users/octocat/followers&quot;,&quot;following_url&quot;:&quot;https://api.github.com/users/octocat/following{/other_user}&quot;,&quot;gists_url&quot;:&quot;https://api.github.com/users/octocat/gists{/gist_id}&quot;,&quot;starred_url&quot;:&quot;https://api.github.com/users/octocat/starred{/owner}{/repo}&quot;,&quot;subscriptions_url&quot;:&quot;https://api.github.com/users/octocat/subscriptions&quot;,&quot;organizations_url&quot;:&quot;https://api.github.com/users/octocat/orgs&quot;,&quot;repos_url&quot;:&quot;https://api.github.com/users/octocat/repos&quot;,&quot;events_url&quot;:&quot;https://api.github.com/users/octocat/events{/privacy}&quot;,&quot;received_events_url&quot;:&quot;https://api.github.com/users/octocat/received_events&quot;,&quot;type&quot;:&quot;User&quot;,&quot;site_admin&quot;:false}}