Question
GitHub Search Authorization
I am trying to authorize my requests to the search feature within the GitHub API. I generated a classic token with all permissions unchecked (since I am only searching through public repos). This token however doesn't seem to work as I get a 'Bad Credentials' error.
I tried the following -
import requests
headers = {
'Authorization': 'token < MY_TOKEN >',
'X-GitHub-Api-Version': '2022-11-28',
}
response = requests.get('https://api.github.com/rate_limit', headers=headers, proxies = custom_proxies)
print(response.content)
I then get the following error-
b'{"message":"Bad credentials","documentation_url":"https://docs.github.com/rest","status":"401"}'
2 31
2