REST API endpoints for users - GitHub Docs
Use the REST API to get public and private information about authenticated users.
Use the REST API to get public and private information about authenticated users.
python import asyncio import os. from azure.identity import DefaultAzureCredential from copilot import CopilotClient from copilot.session import PermissionHandler, ProviderConfig.
This tutorial is about using custom instructions for Copilot code review. For a more general introduction to using custom instructions, see [Add custom instructions for Copilot](/en/copilot/how-tos/copilot-on-github/customize-copilot/add-custom-instructions). ##
Make a request using the GitHub CLI api subcommand, followed by the path. Use the --method or -X flag to specify the method. For more information, see the GitHub CLI api documentation. This example makes a request to the "Get Octocat" endpoint, which uses the method GET and the path /octocat.
Choose an endpoint to make a request to. You can explore GitHub's REST API documentation to discover endpoints that you can use to interact with GitHub.
However GitHub recommends using your GitHub username, or the name of your application, for the `User-Agent` header value. This allows GitHub to contact you if there are problems. If you use the Octokit.js SDK, the SDK will send a valid `User-Agent` header for you.
Mar 10, 2026 · REST API endpoints for user interactions Use the REST API to temporarily restrict which type of user can comment, open issues, or create pull requests in your public repositories.
You can use the official Octokit libraries and other third-party libraries to extend and simplify how you use the GitHub API ... Python. gidgethub ...
The User-Agent header identifies the user or application that is making the request. By default, GitHub CLI sends a valid User-Agent header.The documentation for each GitHub REST API endpoint will describe any query parameters that it supports.
REST API endpoints for repositories Use the REST API to create, manage and control the workflow of public and private GitHub repositories.
There are a few different ways to get a token: You can create a personal access token, generate a token with a GitHub App, or use the built-in GITHUB_TOKEN in a ...
The documentation for each GitHub REST API endpoint will describe any query parameters that it supports. For more information, see the [GitHub REST API documentation](/en/enterprise-cloud@latest/rest).
Introduction This article describes how to use the GitHub REST API with GitHub CLI, curl, or JavaScript. For a quickstart guide, see Quickstart for GitHub REST API.
Use the REST API to manage repositories on GitHub. List organization repositories. Lists repositories for the specified organization. Note. In ...
Authenticating in a GitHub Actions workflow If you want to use the API in a GitHub Actions workflow, GitHub recommends that you authenticate with the built-in GITHUB_TOKEN instead of creating a token. You can grant permissions to the GITHUB_TOKEN with the permissions key. For more information, see Use GITHUB_TOKEN for authentication in workflows.