Skip to content

Instantly share code, notes, and snippets.

Last active Jan 25, 2020
What would you like to do?
Set up Github authorization on your local machine
# R code
# Based on
# This is called "Web Application Flow"
# see
# Follow the instructions there to set up a token. Never share your key or secret.
myapp <- oauth_app("FOSS", key = "pqr", secret = "xyz")
github_token <- oauth2.0_token(oauth_endpoints("github"), myapp)
# In the R console you will have the option to save an authorization file
# or do a one time authorization. Then a web page will open with a message
# and you can close it after reading the message.
# The object github_token is now in your workspace can can be called when
# accessing the Github API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment