![]() ![]() You can also create an OAuth token with an OAuth App to access the REST API. For more information, see " About authentication with a GitHub App." If you want to use the API for an organization or on behalf of another user, GitHub recommends that you use a GitHub App. Authenticating with a token generated by an app The X-GitHub-SSO header will indicate the ID of the organizations that require SAML SSO authorization of your personal access token (classic). If you requested data that could come from multiple organizations, the API will not return results from the organizations that require SAML SSO. If you receive a 403 Forbidden error, you can follow the URL in the X-GitHub-SSO header to authorize your token. If you do not authorize your personal access token (classic) for SAML SSO before you try to use it to access an organization that enforces SAML SSO, you may receive a 404 Not Found or a 403 Forbidden error. ![]() For more information, see " Authorizing a personal access token for use with SAML single sign-on." Fine-grained personal access tokens are authorized during token creation, before access to the organization is granted. If you use a personal access token (classic) to access an organization that enforces SAML single sign-on (SSO) for authentication, you will need to authorize your token after creation. For more information about creating a personal access token, see " Creating a personal access token." If possible, GitHub recommends that you use a fine-grained personal access token instead of a personal access token (classic). If you want to use the GitHub REST API for personal use, you can create a personal access token. Authenticating with a personal access token If you try to use a REST API endpoint without a token or with a token that has insufficient permissions, you will receive a 404 Not Found or 403 Forbidden response. However, if you are passing a JSON web token (JWT), you must use Authorization: Bearer. Note: In most cases, you can use Authorization: Bearer or Authorization: token to pass a token. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |