我想在ruby中驗證google api。我成功獲取了代碼參數。但我不能使用代碼params.i獲得訪問令牌想過去以下參數來獲得訪問令牌缺少必需的參數:grant_type
https://accounts.google.com/o/oauth2/token?code=4/HttxxNNyD8RU-emkYJufAM2&client_id=103xxxxxx-t8uaeuc4cexxxxxxxxv3ha1r50e.apps.googleusercontent.com&client_secret=xxxxxx&grant_type=authorization_code
我得到了如下回應:
An error occured connecting to the server: 400 returned.
<TITLE>Required parameter is missing: grant_type</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1>Required parameter is missing: grant_type</H1> <H2>Error 400</H2>
任何一個可以幫助我得到的accessToken