I have used GitHub API to access private repositories using the Authorization header. This works very well. But, I am unable to see the the repository i.e. send a GET request for the repository webpage.
Suppose the url I want to access is
url = 'https://github.com/username/repo'
which is the link to my private repository. And I have
headers = {'Authorization': 'token mygithubtoken'}
auth = {'myusername', 'mypassword')
I am sending a get request as following
>>> res = requests.get(url, auth=auth, headers=headers)
>>> print(res.status_code)
404
I want to do this because the diff of a pull request is also not accessible this way which is located at https://github.com/user/repo/pull/pr_no.diff