【发布时间】:2014-06-29 19:47:06
【问题描述】:
使用 Nodejs 和 Mikeal 的 Request 进行此调用。执行文档所说的所有操作here,包括 grant_type=authorization_code,但我仍然遇到同样的错误。有关我传递的确切变量和方法,请参阅屏幕截图。
这是首先明确设置 grant_type 的路径
/o/oauth2/token?grant_type=authorization_code&code=4%2F42sz3xxq4wGF9k9joYxRVop9mHi6.UpFaIUqZ_UQaaDn_6y0ZQNh869DgiwI&client_id=199079322117.apps.googleusercontent.com&client_secret=...&redirect_uri=...
【问题讨论】:
-
你有redirect_uri的URL编码吗?
-
我使用的是 Nodejs Request 库的 oauth 选项,它对其进行编码。我最终使用 Nodejs googleapi 的库走了一条不同的路线
标签: node.js oauth-2.0 request google-api