ruby on rails - Can't refresh my access_token -


i've been trying hours new access token google api kept throwing me 400 error : bad request. idea ?

r = restclient.post 'https://accounts.google.com/o/oauth2/token', :refresh_token => refresh_token, :client_id => client_id, :client_secret => client_secret, :grant_type => 'access_token' 

edit : need force content-type ? have alternative solution restclient ?

grant_type should "refresh_token" , not "access_token"

try this:

restclient.post 'https://accounts.google.com/o/oauth2/token', :refresh_token => refresh_token, :client_id => client_id, :client_secret => client_secret, :grant_type => 'refresh_token' 

Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -