Basecamp: OAuth token could not be verified. The internal checksum failed, so the token data was somehow mangled or tampered with. (Python 3)

244 views Asked by At

I got the access token correctly but It always shows this message.

Code

ac_tk=requests.post(url).json()

project_id = #Project ID
url = f'http://3.basecampapi.com/{project_id}/projects.json'
headers1 = {'User-Agent': 'App_Name ([email protected])',
           'Content-Type': 'application/json; charset=utf-8',
           'Authorization': f'Bearer {ac_tk}'
           }
response1 = requests.get(url, headers=headers1)

print("Text: ",response1.text,"\nStatus code: ",response1.status_code)

Output

Text:  {"error":"OAuth token could not be verified. The internal checksum failed, so the token data was somehow mangled or tampered with."} 
Status code:  401

Acceess Token

{'access_token': 'BAhbB0kiAbljAyMS0wNC0xMl.......',
 'expires_in': 12....0,
 'refresh_token': 'BAhbB0kiA......'}
0

There are 0 answers