Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub API3 Delete Access Token

I am making a form that allows users to agree to some conditions before a pull request can be merged into the core of a project. To provide proof of ownership for the GitHub account, the user is required to give the my website read-only access to their GitHub account, using the GitHub API.

I would like to provide "revoke access" functionality to users - I don't actually want access to their account, it is just a good way for me to verify account ownership.

I know that the user is able to revoke application access via the GitHub Applications settings page, but I would like to streamline this if possible. I've looked through the GitHub APIv3 documentation, but have not seen anything that allows one to request that GitHub revokes an access_token.

Question:

Is it possible to programatically revoke my application's access_token?

like image 490
Michael Robinson Avatar asked Jul 06 '12 11:07

Michael Robinson


1 Answers

If you look at the GitHub OAuth Authorizations API, they list the ability to delete an authorization using "DELETE /authorizations/:id"

like image 87
Mark S. Avatar answered Nov 27 '22 12:11

Mark S.