0

json 形式を使用して GA トークンを更新する必要がありますが、動作させることができません。パラメータを使用するとうまく機能します。欠陥があれば教えてください!ありがとう!!!!

動作します (json なし) ====================================== curl -d "client_id ={myId}&client_secret={mySecretId}&grant_type=refresh_token&refresh_token={myRefreshToken}" https://accounts.google.com/o/oauth2/token

動作しません (json) ===================================== curl -H "Accept: application/json" -H "Content-type: application/json" -d '{ "client_id" : "{myId}", "client_secret" : "{mySecretId}", "grant_type" : "refresh_token", "refresh_token" : "{myRefreshToken}" }' https://accounts.google.com/o/oauth2/token

4

1 に答える 1

1

https://developers.google.com/accounts/docs/OAuth2WebServer#refreshを参照してください- この特定のフローは application/x-www-form-urlencoded でのみ機能します

于 2013-10-04T18:38:26.970 に答える