Get GitHub API oauth token with curl.
If you're running a non web app on the github api you can simply get the auth token for it (if you have configured in your account under applications of course) by running the following curl command.
% curl -i -u "username:password" \
https://api.github.com/authorizations \
-d '{"client_id":"APP_CLIENT_ID", "client_secret":"APP_CLIENT_SECRET"}'
Beware that you'll have to escape some shell sensitive special characters that may be in you password.
Written by Jens Grassel
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Filed Under
Did you know?
OAuth buttons are third-party code running on your origin. A compromised script beside that button can tamper with the redirect or capture the session the login just created.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#