【发布时间】:2015-04-24 22:51:24
【问题描述】:
我正在尝试在我正在使用的 PHP 应用程序中使用 Uber API 列出附近的产品。
我使用 OAuth2 库来获取我的访问和刷新令牌,但在尝试进行以下调用 https://api.uber.com/v1/products?latitude=51.556924&longitude=0.106405 时,我收到以下错误响应
array(3) {
["result"]=>
array(3) {
["fields"]=>
array(1) {
["longitude"]=>
string(46) "Longitude must be a float for dictionary value"
}
["message"]=>
string(15) "Invalid request"
["code"]=>
string(17) "validation_failed"
}
["code"]=>
int(422)
["content_type"]=>
string(16) "application/json"
}
这表明问题与我提供的经度有关(坐标是阿森纳足球俱乐部在伦敦体育场外的票房)。
我错过了什么吗?
调用https://api.uber.com/v1/me 会返回预期结果。所以我认为它不是访问令牌。
谢谢 -克里斯
【问题讨论】: