This file contains 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
Via OAuth Tokens | |
Alternatively, you can use personal access tokens or OAuth tokens instead of your password. | |
curl -u username:token https://api.github.com/user | |
This approach is useful if your tools only support Basic Authentication but you want to take advantage of OAuth access token security features. | |
Authenticating for SAML SSO | |
Note: Integrations and OAuth applications that generate tokens on behalf of others are automatically whitelisted. | |
If you're using the API to access an organization that enforces SAML SSO for authentication, you'll need to create a personal access token (PAT) and whitelist the token for that organization. Visit the URL specified in X-GitHub-SSO to whitelist the token for the organization. | |
curl -v -H "Authorization: token TOKEN" https://api.github.com/repos/octodocs-test/test |