import requests url = 'http://httpbin.org/headers' access_token = { 'Authorization': 'Bearer {access_token}' } response = requests.get(url, headers=access_token) print(response.json())