Posted by & filed under Open-source, Web Development. 5,695 views

If you’re looking to use the GitHub API outside a web application, you’ll need to generate an OAuth 2 token. GitHub provides a good way to add a non web app to your account. It’s done with a curl, command-line:

            curl \
            --user "myuser" \
            --data '{"scopes":["user"],"note":"GitHub Stars to Bookmarks"}'

which will ask you for your password and return a json document which will contain your token.

Your scopes selection might be different from mine, refer to this document to chose them.

You can check that this process went well by hitting: . You’ll see the application authorizations on

I am using this in my githubfav2pinboard application.