My question is similar to the one posted recently
here<https://groups.google.com/forum/#!searchin/adwords-api/AdsCommon$3A$3AErrors$3A$3AAuthError/adwords-api/1J8n4bUnyh4/5-hanTeeBVwJ>
.
I am having a omniauth based rails application that uses the
google-adwords-api gem to access the adwords api gem. Until recently, the
application was working fine but suddenly, (for no apparent reason so far)
it refused to authorize with the adwords server. I have followed various
steps given on
stackoverflow<http://stackoverflow.com/questions/9241213/how-to-refresh-token-with-google-api-client>
and
searched the internet for some help, but to no avail.
What is more baffling is that the sample rails client runs without an error
which is using the similar configuration for the api access. Here's the
error message:
Authorization error occured: Authorization failed. Server message: {
"error" : "invalid_grant"
}
Here's the code responsible for the error:
...
api = get_adwords_api()
begin
session[:token] = api.authorize(
{
:oauth2_callback => login_callback_url,
:oauth2_verification_code =>params[:code]
} )
rescue AdsCommon::Errors::AuthError => e
session[:token] = api.authorize({:oauth2_callback =>
login_callback_url})
end
...
The same error occurs for both the authorize calls.
Note that I am on ruby 2.0/rails 4 application and using the v201306
version of the api.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.