Why does GitHub API require admin rights to leave a comment on a PR?

I tried to create a comment using GitHub HTTP API and I got the following response with 403 Forbidden:

{  
 "message": "Must have admin rights to Repository.",  
 "documentation\_url": "https://developer.github.com/v3/issues/comments/#create-a-comment"  
}

The repository is not private but public, and the request was authenticated through a personal access token. (The response indeed contained X-RateLimit-Limit: 5000 header, an evidence that implies the request was properly authenticated.)

What’s wrong with my use of GitHub API? Why does it requires admin rights to merely leave some comments?

Solved — It was because the personal access token didn’t have not enough scope (public_repo).

4 Likes