端点请求返回404未找到uber-api沙箱环境



Uber api沙盒中的requests端点给出的响应为:

CCD_ 2。

对于沙箱,我使用端点:

https://sandbox-api.uber.com/v1/sandbox/requests

如果我使用uber-prod端点,同样的请求也能正常工作

https://api.uber.com/v1/requests

我使用python请求库作为api:

import request
params = {'start_longitude': 'xx.xxxxxx', 'end_longitude': 'xx.xxxxxx', 
          'start_latitude': 'xx.xxxxxx', 'end_latitude': 'xx.xxxxxx', 
          'product_id': '0dfc35e0-b4be-49a1-b1bf-0bc7217e4b58'}
header = {'Content-Type': 'application/json', 
          'Authorization': 'Bearer xxx-acces-token-xxx'`}
res = requests.post('https://sandbox-api.uber.com/v1/sandbox/requests',
                     data=json.dumps(params), headers=headers)

正如我所说的,如果我将url更改为uber-prod环境,这将起作用:

 res = requests.post('https://api.uber.com/v1/requests',
                      data=json.dumps(params), headers=headers)

uber api的沙箱url是:-https://sandbox-api.uber.com/v1/requests

最新更新