0

我无法从 uber API 获取我的访问令牌。

当我单击使用 uber 登录时,我从您的服务器收到了一个代码-

然后我把它放在我失眠的标题中。

grant_type:authorization_code (i just type 'authorization_code' here)

code: 0RWlkekK3kXdoKSDlbSuI6HAZHbb0K ( i know this expires after 10 mins but i have tried with different codes )

redirect_uri:http://localhost:3000/auth/uber/callback (the redirect i have on your app)

client_id:my_client_id (whatever it is in manage my app)

client_secret:my_client_secret

但是我没有从您的服务器收到带有我的令牌的响应。

我究竟做错了什么?

谢谢

4

2 回答 2

0

如果您localhost在 URI 中提供 Uber,它将尝试连接到自己,而不是返回到您的服务器。使用在开放 Internet 上有效的主机名或 IP 地址。

于 2015-11-20T19:37:15.390 回答
0
  1. redirect_uri 应该与您放在仪表板上的完全相同。
  2. 代码可能会过期或被使用(AngularJs $location 重定向会因为某种原因使其过期)
  3. 将可能需要的数据体发布到 jQuery:$.param(data) 或 AngularJs:$httpParamSerializer(data)
于 2016-11-25T06:04:07.640 回答