How can my Github App get an access token that have the permission to create an issue?
I enabled all the permissions in the Settings-> Developer settings -> GitHub Apps -> Permissions and webhook
page, follow the instructions to get access token, then make a request referring the docs,but get the response below:
{
"message": "Resource not accessible by integration",
"documentation_url": "https://developer.github.com/v3/issues/#create-an-issue"
}
but everything work out fine when I use personal access token to make this request.
I enabled all the permissions
Subscribe all the events
https://github.com/login/oauth/authorize?client_id=Iv1.abfa65bfc68dc75a
https://github.com/login/oauth/access_token
when I replace access_token I got from previous steps with my personal access token, everything work out fine.
You can select user-level permissions from within your GitHub App's settings in the User permissions section of the Permissions & webhooks page. For more information on selecting permissions, see "Editing a GitHub App's permissions."
About access permissions on GitHub A permission is the ability to perform a specific action. For example, the ability to delete an issue is a permission. A role is a set of permissions you can assign to individuals or teams. Roles work differently for different types of accounts.
A very easy way to check is whether you see an edit 'pencil' icon in the top right of the README.MD on the main Code page of the repo (scroll down to it if there's a long list of top level files/folders). Do this when you are logged in to Github, obviously.
Great, detailed write up of the issue you're encountering!
follow the instructions to get access token
I think this may be the cause of the issues you are running into. You've created a GitHub App, but you are looking at the instructions for authorizing OAuth Apps.
The docs for "Authenticating with GitHub Apps" are probably what you are looking for: https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With