2012-10-11 5 views
6

使用しているGoogleのOAuth2の遊び場を使用しようと、無効な要求:https://developers.google.com/oauthplayground/ 続か:https://developers.google.com/accounts/docs/OAuth2WebServer#offlineoauth2.0リフレッシュトークン

誰もがなぜ私は無効な要求を取得していますか?

POST /o/oauth2/token HTTP/1.1 
Host: accounts.google.com 
Content-length: 209 
Content-type: application/x-www-form-urlencoded 
Authorization: OAuth ya29.XXXXXXXX 

client_id=XXXXXXXXX& 
client_secret=XXXXXXXXX& 
refresh_token=1/0ffkj5lggn8XXXXXXXXX& 
grant_type=refresh_token 

HTTP/1.1 400 Bad Request 
Content-length: 33 
X-xss-protection: 1; mode=block 
X-content-type-options: nosniff 
X-google-cache-control: remote-fetch 
-content-encoding: gzip 
Server: GSE 
Reason: Bad Request 
Via: HTTP/1.1 GWA 
Pragma: no-cache 
Cache-control: no-cache, no-store, max-age=0, must-revalidate 
Date: Thu, 11 Oct 2012 21:29:55 GMT 
X-frame-options: SAMEORIGIN 
Content-type: application/json 
Expires: Fri, 01 Jan 1990 00:00:00 GMT 

{ 
    "error" : "invalid_request" 
} 

答えて

1

あなたは400を取得している場合は、無効なパラメータを追加または1つが欠けているためです。

編集:

私は余分なヘッダの許可があり、与えられたデータから、信じています。これは、ヘッダーに同じを提供する必要がないaccess_tokenはリフレッシュしながら、認証済みのコール

Authorization : Bearer XXXXXXXXXXXXXXXX 

を作るために、access_tokenはをヘッダに渡されている場合のみのOAuth2で使用されています。

https://developers.google.com/accounts/docs/OAuth2InstalledApp#refresh

+0

具体的には.... – DontVoteMeDown

関連する問題