À propos des autorisations nécessaires pour un fine-grained personal access token
Quand vous créez un fine-grained personal access token, vous lui octroyez un ensemble d’autorisations. Les autorisations définissent les ressources auxquelles l’GitHub App peuvent accéder via l’API. Pour plus d’informations, consultez « Gestion de vos jetons d'accès personnels ».
Pour vous aider à choisir les autorisations appropriées, vous recevrez l’en-tête X-Accepted-GitHub-Permissions
dans la réponse de l’API REST. L’en-tête vous indique les autorisations requises pour accéder au point de terminaison. Pour plus d’informations, consultez « Résolution des problèmes de l’API REST ».
Ces autorisations sont nécessaires pour accéder aux ressources privées. Certains points de terminaison peuvent également être utilisés pour accéder à des ressources publiques sans ces autorisations. Consultez la documentation d’un point de terminaison pour savoir si ce dernier peut accéder aux ressources publiques sans autorisation.
Certains points de terminaison nécessitent plusieurs autorisations. D’autres points de terminaison fonctionnent avec n’importe quelle autorisation d’un ensemble d’autorisations. Dans ce cas, la colonne « Autorisations supplémentaires » comprend une coche. Consultez la documentation d’un point de terminaison pour obtenir plus d’informations sur les autorisations requises pour l’utiliser.
Business permissions for "Enterprise administration"
Organization permissions for "API Insights"
Organization permissions for "Administration"
Organization permissions for "Blocking users"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
PUT /orgs/{org}/blocks/{username} | write | |
DELETE /orgs/{org}/blocks/{username} | write | |
GET /orgs/{org}/blocks | read | |
GET /orgs/{org}/blocks/{username} | read |
Organization permissions for "Custom organization roles"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
POST /orgs/{org}/organization-roles | write | |
PATCH /orgs/{org}/organization-roles/{role_id} | write | |
DELETE /orgs/{org}/organization-roles/{role_id} | write | |
GET /orgs/{org}/organization-fine-grained-permissions | read | |
GET /orgs/{org}/organization-roles | read | |
GET /orgs/{org}/organization-roles/{role_id} | read |
Organization permissions for "Custom properties"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
PATCH /orgs/{org}/properties/schema | admin | |
PUT /orgs/{org}/properties/schema/{custom_property_name} | admin | |
DELETE /orgs/{org}/properties/schema/{custom_property_name} | admin | |
PATCH /orgs/{org}/properties/values | write | |
GET /orgs/{org}/properties/schema | read | |
GET /orgs/{org}/properties/schema/{custom_property_name} | read | |
GET /orgs/{org}/properties/values | read |
Organization permissions for "Custom repository roles"
Organization permissions for "Events"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
GET /users/{username}/events/orgs/{org} | read |
Organization permissions for "GitHub Copilot Business"
Organization permissions for "Members"
Organization permissions for "Organization announcement banners"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
PATCH /orgs/{org}/announcement | write | |
DELETE /orgs/{org}/announcement | write | |
GET /orgs/{org}/announcement | read |
Organization permissions for "Organization codespaces secrets"
Organization permissions for "Organization codespaces settings"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
PUT /orgs/{org}/codespaces/access | write | |
POST /orgs/{org}/codespaces/access/selected_users | write | |
DELETE /orgs/{org}/codespaces/access/selected_users | write |
Organization permissions for "Organization codespaces"
Organization permissions for "Organization dependabot secrets"
Organization permissions for "Personal access token requests"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
POST /orgs/{org}/personal-access-token-requests | write | |
POST /orgs/{org}/personal-access-token-requests/{pat_request_id} | write | |
GET /orgs/{org}/personal-access-token-requests | read | |
GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories | read |
Organization permissions for "Personal access tokens"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
POST /orgs/{org}/personal-access-tokens | write | |
POST /orgs/{org}/personal-access-tokens/{pat_id} | write | |
GET /orgs/{org}/personal-access-tokens | read | |
GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories | read |
Organization permissions for "Projects"
Organization permissions for "Secrets"
Organization permissions for "Self-hosted runners"
Organization permissions for "Team discussions"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id} | write | |
DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id} | write |
Organization permissions for "Variables"
Organization permissions for "Webhooks"
Repository permissions for "Actions"
Repository permissions for "Administration"
Repository permissions for "Attestations"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
POST /repos/{owner}/{repo}/attestations | write | |
GET /repos/{owner}/{repo}/attestations/{subject_digest} | read |
Repository permissions for "Checks"
Repository permissions for "Code scanning alerts"
Repository permissions for "Codespaces lifecycle admin"
Repository permissions for "Codespaces metadata"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
GET /repos/{owner}/{repo}/codespaces/devcontainers | read | |
GET /repos/{owner}/{repo}/codespaces/machines | read | |
GET /user/codespaces/{codespace_name}/machines | read |
Repository permissions for "Codespaces secrets"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
GET /repos/{owner}/{repo}/codespaces/secrets | write | |
GET /repos/{owner}/{repo}/codespaces/secrets/public-key | write | |
GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name} | write | |
PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name} | write | |
DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name} | write |
Repository permissions for "Codespaces"
Repository permissions for "Commit statuses"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
POST /repos/{owner}/{repo}/statuses/{sha} | write | |
GET /repos/{owner}/{repo}/commits/{ref}/status | read | |
GET /repos/{owner}/{repo}/commits/{ref}/statuses | read |
Repository permissions for "Contents"
Repository permissions for "Custom properties"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
PATCH /repos/{owner}/{repo}/properties/values | write |
Repository permissions for "Dependabot alerts"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number} | write | |
GET /orgs/{org}/dependabot/alerts | read | |
GET /repos/{owner}/{repo}/dependabot/alerts | read | |
GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number} | read |
Repository permissions for "Dependabot secrets"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name} | write | |
DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name} | write | |
GET /repos/{owner}/{repo}/dependabot/secrets | read | |
GET /repos/{owner}/{repo}/dependabot/secrets/public-key | read | |
GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name} | read |
Repository permissions for "Deployments"
Repository permissions for "Environments"
Repository permissions for "Issues"
Repository permissions for "Metadata"
Repository permissions for "Pages"
Repository permissions for "Projects"
Repository permissions for "Pull requests"
Repository permissions for "Repository security advisories"
Repository permissions for "Secret scanning alerts"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number} | write | |
GET /orgs/{org}/secret-scanning/alerts | read | |
GET /repos/{owner}/{repo}/secret-scanning/alerts | read | |
GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number} | read | |
GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations | read |
Repository permissions for "Secrets"
Repository permissions for "Variables"
Repository permissions for "Webhooks"
Repository permissions for "Workflows"
User permissions for "Block another user"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
PUT /user/blocks/{username} | write | |
DELETE /user/blocks/{username} | write | |
GET /user/blocks | read | |
GET /user/blocks/{username} | read |
User permissions for "Codespaces user secrets"
User permissions for "Email addresses"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
PATCH /user/email/visibility | write | |
POST /user/emails | write | |
DELETE /user/emails | write | |
GET /user/emails | read | |
GET /user/public_emails | read |
User permissions for "Followers"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
PUT /user/following/{username} | write | |
DELETE /user/following/{username} | write | |
GET /user/followers | read | |
GET /user/following | read | |
GET /user/following/{username} | read |
User permissions for "GPG keys"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
POST /user/gpg_keys | write | |
DELETE /user/gpg_keys/{gpg_key_id} | write | |
GET /user/gpg_keys | read | |
GET /user/gpg_keys/{gpg_key_id} | read |
User permissions for "Gists"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
POST /gists | write | |
PATCH /gists/{gist_id} | write | |
DELETE /gists/{gist_id} | write | |
POST /gists/{gist_id}/comments | write | |
PATCH /gists/{gist_id}/comments/{comment_id} | write | |
DELETE /gists/{gist_id}/comments/{comment_id} | write | |
POST /gists/{gist_id}/forks | write | |
PUT /gists/{gist_id}/star | write | |
DELETE /gists/{gist_id}/star | write |
User permissions for "Git SSH keys"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
POST /user/keys | write | |
DELETE /user/keys/{key_id} | write | |
GET /user/keys | read | |
GET /user/keys/{key_id} | read | |
GET /users/{username}/keys | read |
User permissions for "Interaction limits"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
PUT /user/interaction-limits | write | |
DELETE /user/interaction-limits | write | |
GET /user/interaction-limits | read |
User permissions for "Notifications"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
GET /notifications | read | Plusieurs autorisations sont requises, ou une autre autorisation peut être utilisée. Pour plus d’informations sur les autorisations, consultez la documentation pour ce point de terminaison. |
User permissions for "Plan"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
GET /users/{username}/settings/billing/actions | read | |
GET /users/{username}/settings/billing/packages | read | |
GET /users/{username}/settings/billing/shared-storage | read |
User permissions for "Profile"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
PATCH /user | write | |
POST /user/social_accounts | write | |
DELETE /user/social_accounts | write |
User permissions for "SSH signing keys"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
POST /user/ssh_signing_keys | write | |
DELETE /user/ssh_signing_keys/{ssh_signing_key_id} | write | |
GET /user/ssh_signing_keys | read | |
GET /user/ssh_signing_keys/{ssh_signing_key_id} | read |
User permissions for "Starring"
User permissions for "Watching"
Point de terminaison | Access | Autorisations supplémentaires |
---|---|---|
GET /user/subscriptions | read | |
GET /users/{username}/subscriptions | read |