Imgur发送无效的客户端ID响应(错误:403)

时间:2019-03-19 17:17:47

标签: python-3.x http-status-code-403 imgur

我正在测试以下代码:

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,这是正确的。

0 个答案:

没有答案