Coinbase OAuth适用于localhost,但不适用于实时服务器

时间:2014-06-15 18:17:11

标签: php redirect oauth localhost coinbase-api

在我的实时服务器上收到The redirect uri included is not valid.错误消息,而在我的本地主机上OAuth工作正常。

这里是两者的完整网址:

本地主机:

https://coinbase.com/oauth/authorize?response_type=code&client_id=xxx&redirect_uri=http%3A%2F%2Flocalhost%2Faccounts-coinbase%2Foauth&scope=balance+addresses+user+transactions

直播服务器(https://example.com

https://coinbase.com/oauth/authorize?response_type=code&client_id=xxx&redirect_uri=https%3A%2F%2Fexample.com%2Faccounts-coinbase%2Foauth&scope=balance+addresses+user+transactions

我非常有信心我之前使用过实时服务器OAuth。任何想法为什么现在都失败了?

1 个答案:

答案 0 :(得分:1)

好的,我解决了自己的问题。

错误消息The redirect uri included is not valid.确实准确反映了问题。实际上问题是我的Coinbase OAuth应用程序有一个localhost重定向网址。

相关的OAuth重定向网址,称为“回调网址”,是从这个相当难以找到的网页设置的:https://coinbase.com/oauth/applications

我刚刚在example.com上切换了localhost,但它确实有效。

相关问题