Skip to content

Instantly share code, notes, and snippets.

@typebrook
Last active February 7, 2022 08:27
Show Gist options
  • Save typebrook/48ec1f0b59f7ec0b459c9bb4d6b47bd8 to your computer and use it in GitHub Desktop.
Save typebrook/48ec1f0b59f7ec0b459c9bb4d6b47bd8 to your computer and use it in GitHub Desktop.
[curl-Github] Use curl to get Github Access Token #github #curl #token
curl https://api.github.com/authorizations \
--user "typebrook" \
--data '{"scopes":["gist"], "note": "gist"}'
read -p "2-factor code: " OTP
curl https://api.github.com/authorizations \
--user typebrook -H "X-GitHub-OTP: $OTP" \
--data '{"scopes": ["gist"], "note": "gist"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment