Неправильно токен получен, что сказать
Используйте любой доступный способ из документации. Обычная OAuth2 аутентификация
https://www.donationalerts.com/apidoc#authorization
Пример получения токена с использованием Authorization Code grant type
import requests
import webbrowser
from urllib.parse import urlencode
APP_ID =
API_KEY = ''
REDIRECT_URI = 'http://127.0.0.1:8000'
SCOPE = 'oauth-user-show oauth-donation-index'
# 2. Authorization Request
data = {'client_id': APP_ID, 'redirect_uri': REDIRECT_URI, 'response_type': 'code', 'scope': SCOPE}
url = 'https://www.donationalerts.com/oauth/authorize?' + urlencode(data)
webbrowser.open(url)
code = input('code: ')
# 4. Getting Access Token
data = {'grant_type':'authorization_code', 'client_id':APP_ID, 'client_secret': API_KEY, 'redirect_uri': REDIRECT_URI, 'code': code}
r = requests.post('https://www.donationalerts.com/oauth/token', data=data).json()
access_token = r['access_token']
refresh_token = r['refresh_token']
# Authorized Request
headers = {'Authorization': 'Bearer {}'.format(access_token)}
response = requests.get('https://www.donationalerts.com/api/v1/alerts/donations', headers=headers)
r = response.json()
print(r)