验证错误Python 3.6和Twitter API v1.1

问题描述

当我在Postman中用我的所有钥匙进行一次get请求时,它就会起作用:

https://api.twitter.com/1.1//statuses/user_timeline.json?user_id=1456403328

screenshot

但是,如果我使用Postmans代码导出器获取Python代码,它将不再起作用:

import requests

url = "https://api.twitter.com/1.1//statuses/user_timeline.json?user_id=1456403328"


headers = {
  *Keys*
}

response = requests.request("GET",url,headers=headers)

print(response.status.code)

我返回了状态码401,这意味着我的密钥是错误的,但是如果在邮递员中可以使用,它们就不可能了

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...