我正在测试以下代码:
import requests
url = 'https://api.imgur.com/3/gallery/jWWKh58#8jDVIR8'
payload = {}
headers = {
'Authorization': 'Client-ID {{MY_CLIENT_ID}}'
}
response = requests.request('GET', url, headers = headers,
allow_redirects=False)
print(response.text)
但是运行此代码段后,出现以下错误:
{"data":{"error":"Invalid client_id","request":"\/3\/gallery\/jWWKh58","method":"GET"},"success":false,"status":403}
这是什么问题?我已经多次检查我的客户ID,这是正确的。