Thanks Peter! I've been banging my head against the wall on this for some time. It turns out my problem was that I'm using Omniauth and the client ID and client secret set in the Omniauth config file was different than in the adwords_api.yml file. Once I made them both the same, the token is refreshed automatically.
On Wednesday, May 18, 2016 at 9:12:06 AM UTC-4, john mock wrote: > > Hi Everyone, > First off, I'd like to apologize if this is a silly question but I'm a > total Adwords API newbie. I have the rails example project > (google-api-ads-ruby/adwords_api/examples/adwords_on_rails/) working and > modified it to include offline access in the initial request. I'm saving > off the refresh token in my database for each user but I'm not sure what to > do from there. After the initial access token expires, my calls to the API > are failing with AdsCommon::Errors::OAuth2VerificationRequired . > > Do I manually need to rescue errors from each API call to determine if the > access token has expired? > > Once I know the access token has expired, how do I use the refresh token > to obtain a new access token? > > Thanks in advance for any help!! > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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]. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/58a2edbf-0134-4d80-a8a3-3b71ffaf9dfc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
