Software Engineering :: Source Control :: VCS :: Git :: Managed Hosting Platform :: GitHub :: Gist :: API :: Authentication
⪼ Made with 💜 by Polyglot.
There are two ways to authenticate through GitHub API v3. Requests that require authentication will return 404 Not Found, instead of 403 Forbidden, in some places. This is to prevent the accidental leakage of private repositories to unauthorized users.
You can read public gists anonymously, but you must be signed into GitHub to create gists. To read or write gists on a user's behalf, you need the
gist
OAuth scope and a token.
> curl -u "username" https://api.github.com
> curl -H "Authorization: token $GIST_API_TOKEN" https://api.github.com
> curl -H "Authorization: Bearer $GIST_API_TOKEN" https://api.github.com
machine gist.github.com login git password $GIST_API_TOKEN