Update an existing authorization

PATCH {{baseUrl}}/authorizations/:authorization_id

Deprecation Notice: GitHub 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.

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](https://developer.github.com/v3/auth/#working-with-two-factor-authentication).

You can only send one of these scope keys at a time.

Request Body

{"scopes"=>["<string>", "<string>"], "add_scopes"=>["<string>", "<string>"], "remove_scopes"=>["<string>", "<string>"], "note"=>"<string>", "note_url"=>"<string>", "fingerprint"=>"<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;&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;}