Reputation: 1535
I need to refresh my GA token using json format, but I can NOT get it to work. It works great using parameters. Please let me know if you see any flaws! THANKS!!!!
Works (no json) ======================================== curl -d "client_id={myId}&client_secret={mySecretId}&grant_type=refresh_token&refresh_token={myRefreshToken}" https://accounts.google.com/o/oauth2/token
Doesn't work (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
Upvotes: 0
Views: 181
Reputation: 1663
See https://developers.google.com/accounts/docs/OAuth2WebServer#refresh - this particular flow only works with application/x-www-form-urlencoded
Upvotes: 1