2015-04-02 67 views
2

尤伯杯的API requests終點在沙箱中給出響應,404:端點請求返回沒有發現尤伯杯API測試環境

u'<html><title>404: Not Found</title><body>404: Not Found</body></html>'

對於沙箱我使用端點:

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) 
:如果我用超級督促端點

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

我用python的請求lib中API

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

同一請求工作正常

而且就像我說的這個工作,如果我更改網址爲你BER PROD環境:

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

什麼是你發送的命令是什麼?哪種工具和哪種編程語言? – martin 2015-04-02 09:53:30

+0

嘿@馬丁我添加了細節。 – ninja 2015-04-02 10:07:18

+0

沙盒網址是https://sandbox-api.uber.com/v1/requests – ninja 2015-04-10 21:01:42

回答

3

沙盒網址爲超級API是: - https://sandbox-api.uber.com/v1/requests