这种行为从今天(2015 年 11 月 10 日)开始。当我调用沙盒 Uber 端点时,真正的司机会接受并出现。
我花了 5 个小时试图了解正在发生的事情。过去 1.5 个月我一直在使用 Uber API,之前没有遇到过这个问题。
我提出了这个请求(现在我用 Postman 来做,所以似乎没有其他东西可以影响它):
URL: https://sandbox-api.uber.com/v1/requests
Method: POST
Headers:
Authorization Bearer AvwkOYENiYRS... (Got it from Uber)
Content-Type: application/json
body:
{
"product_id": "04a497f5-380d-47f2-bf1b-ad4cfdcb51f2", // got from uber before that
"start_latitude":37.4237323,
"start_longitude":-122.09827279999999,
"end_latitude":37.4243272,
"end_longitude":-122.09491579999997
}
我收到 Uber 的成功回复。一段时间后,服务器开始接收来自 Uber 的事件:
X-Environment: production
{
...
"event_type": "requests.status_changed",
"meta": {
"resource_id": "...", // resource_id that I get when requested sandboxed api
"status": "accepted" // and then arriving, etc
},
...
}