![]() The REST API has numerous endpoints the GraphQL API has a single endpoint: For more information, see " Creating an OAuth app" and " Authorizing OAuth apps." The GraphQL endpoint Then, you can use the access token that you received to access the API. To authenticate with an OAuth token from an OAuth app, you must first authorize your OAuth app using either a web application flow or device flow. For more information, see " Registering a GitHub App" and " About authentication with a GitHub App." Authenticating with a OAuth app In both cases, you will generate a token that you can use to authenticate to the GraphQL API. ![]() In order to attribute app activity to a user, you can make your app authenticate on behalf of a user. In order to attribute activity to your app, you can make your app authenticate as an app installation. ![]() If you want to use the API on behalf of an organization or another user, GitHub recommends that you use a GitHub App. If your token does not have the required scopes or permissions to access a resource, the API will return an error message that states the scopes or permissions your token needs. To access public repositories with a personal access token (classic), select the "public_repo" scope. To authenticate with a personal access token, follow the steps in " Managing your personal access tokens." The data that you are requesting will dictate which scopes or permissions you will need.įor example, select the "issues:read" permission to read all of the issues in the repositories your token has access to.Īll fine-grained personal access tokens include read access to public repositories. Authenticating with a personal access token You can authenticate to the GraphQL API using a personal access token, GitHub App, or OAuth app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |