【发布时间】:2016-03-05 13:00:56
【问题描述】:
我正在使用此代码获取有关 Imgur 图像的数据。我认为这不需要 Oauth2,但标头中的客户端 ID 除外。
import requests
client_id = '<my_client_id>'
header = {"Authorization": "Client-ID " + client_id};
r = requests.post("https://api.imgur.com/3/image/WPYW1pE", headers=header);
r = r.json();
print(r);
但是,我收到“权限被拒绝”错误。是否需要 access_token 之类的?
【问题讨论】:
标签: python python-2.7 python-requests imgur