Created
November 8, 2016 07:56
-
-
Save bolerap/f157f76789ce1f08535881e9cc537a6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Send GET request to github api to get OAuth token. | |
curl --user "<username>" --data '{"scopes": ["gist"], "note": "Demo Oauth token"}' https://api.github.com/authorizations | |
# Use OAuth token to access resource | |
curl https://api.github.com/gitsts/starred?access_token=<token_string> | |
# or use OAuth token on request header | |
curl --header "Authorization: token <token_string>" https://api.github.com/gists/starred | |
# List all authorizations | |
curl --user "<username>" https://api.github.com/authorizations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment