Skip to content

[API v3] Get Repo Permissions #24571

Discussion options

You must be logged in to vote

Hi @sommersoft,

Thank you for being here! The permission’s data is included only if you authenticate with the API, for example

curl -v -H "Authorization: token $TOKEN" https://api.github.com/repos/github/linguist

Alternatively, you could use the GraphQL API to fetch a repo and your permission:

query {
	repository(owner:"github", name:"linguist") {
    viewerPermission
  }
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment