VOOZH about

URL: https://github.com/orgs/community/discussions/200353

⇱ `markFileAsViewed` GraphQL mutation returns "Resource not accessible by personal access token" with fine-grained PAT Β· community Β· Discussion #200353 Β· GitHub


Skip to content

πŸ‘ @community
GitHub Community

markFileAsViewed GraphQL mutation returns "Resource not accessible by personal access token" with fine-grained PAT #200353

πŸ‘ Image
suveshmoza

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:

  1. 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.

  2. Organization restrictions: If the repository belongs to an organization that has blocked fine-g…

Replies: 2 comments Β· 1 reply

πŸ‘ Image
github-actions[bot]
Bot

0 replies
Answer selected by suveshmoza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.