Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 2

Download file attached to issue comment on private repo

Is there a way to download a file attached to an issue comment on a private repo via the API?

 

I found a staff comment on an issue indicating that the API doesn't support that and tried downloading using the URL from the issue, which looks something like https://github.com/someowner/somerepo/files/123456/foo.txt but get a 404. I'm guessing that is because the API token is only for api.github.com? How can I download issue comment files programatically?

 

Thanks

1 Reply
Community Manager
Message 2 of 2

Re: Download file attached to issue comment on private repo

If it is scoped to a private repo, then you'll have to authenticate as a user that has access to that private repository to download the file. You can find information about various methods of authentication in our developer documentation.

 

Let us know if you have more questions.