Uber-api历史终点在授权后无效

时间:2015-03-31 14:13:00

标签: uber-api

我正在编写基于uber apis的应用程序。 为此,我使用'profile history_lite request'作为范围,同时使用oauth2进行身份验证。验证后,我正在调用端点: -

'https://api.uber.com/v1/history'
给出错误401: -  “message”:“需要至少一个范围。可用范围:”,“代码”:“未授权”

但其他端点“https://api.uber.com/v1/products?latitude=37.7759792&longitude=-122.41823”正在运作。

我是否需要获得第一个端点工作的任何其他权限,或者我遗失了什么?

我使用python请求lib进行api调用,看起来像: -

res = requests.get(endpoint, headers=headers) 

和标题是一个值为

的地图
{'Content-Type': 'application/json', 'Authorization': 'Bearer xxx-acces-token-xxx'}

1 个答案:

答案 0 :(得分:3)

/v1/history(需要history范围)已被弃用且不再可用。

/v1.1/history仍然可用,可通过history_lite范围访问。