π @community
GitHub Community
markFileAsViewed GraphQL mutation returns "Resource not accessible by personal access token" with fine-grained PAT
#200353
Answered
by
dacdoyx
suveshmoza
asked this question in
Apps, API and Webhooks
Β·
2 comments
Β·
1 reply
Answered by
dacdoyx
The issue is that fine-grained PATs require explicit repository-level access in addition to the right permissions.
The markFileAsViewed mutation needs pull_requests: write permission (which you already have), but the PAT must also be installed on the specific repository containing the PR.
Two things to check:
-
Repository access: When creating the fine-grained PAT, did you select "All repositories" or only "Only select repositories"? If the repo containing the PR isn't explicitly selected, you will get this error. Go to https://github.com/settings/tokens and check the PAT's repository access.
-
Organization restrictions: If the repository belongs to an organization that has blocked fine-gβ¦
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Category
Apps, API and Webhooks
