Ruby On Rails: AdsCommon::Errors::AuthError - OAuth2 token refresh failed:

330 views
Skip to first unread message

SOHAIR AHMAD

unread,
Feb 24, 2017, 10:32:55 PM2/24/17
to AdWords API Forum
Hi, 

I just regenerated the Refresh token and Access token. My problem is not resolved yet, as I am still getting the same error.

I am using Ruby wrapper https://github.com/googleads/google-api-ads-ruby, and I also asked the question here: https://github.com/googleads/google-api-ads-ruby/issues/27#issuecomment-282208227, they refered me here,

If anyone here can resolve my problem I will be thankful.



These are my settings:


:authentication:
 
:method: OAuth2
 
:oauth2_client_id: <my-client-id>
 
:oauth2_client_secret: <my-client-secret>
 
:developer_token:<my-dev-token>
 
:client_customer_id: < client_customer_id >
  :user_agent:<user-agent>
 
:oauth2_token:
   
:access_token: <access-token>
   
:refresh_token: <refresh-token>
   
:issued_at: 2016-12-02 13:32:53.592650000 -08:00
   
:expires_in: 3600
   
:id_token:
:service:
 
:environment: PRODUCTION
:connection:
 
:enable_gzip: false
:library:
 
:log_level: INFO




Here is backtrace:



AdsCommon::Errors::AuthError - OAuth2 token refresh failed:
  google
-ads-common (0.12.6) lib/ads_common/auth/oauth2_handler.rb:100:in `rescue in refresh_token!'
  google-ads-common (0.12.6) lib/ads_common/auth/oauth2_handler.rb:94:in `
refresh_token!'
  google-ads-common (0.12.6) lib/ads_common/auth/oauth2_handler.rb:87:in `get_token'

  google
-ads-common (0.12.6) lib/ads_common/auth/oauth2_handler.rb:79:in `auth_string'
  google-adwords-api (0.22.0) lib/adwords_api/report_header_handler.rb:50:in `
headers'
  google-adwords-api (0.22.0) lib/adwords_api/report_utils.rb:257:in `get_report_request_headers'

  google
-adwords-api (0.22.0) lib/adwords_api/report_utils.rb:224:in `make_adhoc_request'
  google-adwords-api (0.22.0) lib/adwords_api/report_utils.rb:209:in `
get_report_response'
  google-adwords-api (0.22.0) lib/adwords_api/report_utils.rb:56:in `download_report'



Peter Oliquino

unread,
Feb 26, 2017, 10:43:32 PM2/26/17
to AdWords API Forum
Hi Sohair,

Could you confirm if you are still experiencing the error? The OAuth issue should be resolved by now, however, if you are still getting the error, kindly send us any logs or SOAP request and response. You may reply using Reply privately to author.

Cheers, 
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages