I've modified one of the API examples to store the Refresh and Access 
tokens in a database. I've setup the delegate for OnOAuthTokensObtained as 
described in the client library documentation to store updated tokens in 
the database and set RetryCount to 1 (and a few other attempts at numbers > 
1). It appears that about every hour the Access token is updated in my 
database successfully. Still, when a new Access token is received and 
stored in my database, the first call to any API function that I've tried 
will result in an AuthenticationError.OAUTH_TOKEN_INVALID exception. A 
refresh of the page immediately thereafter will result in a successful call 
and the page will render as expected. It was my understand that setting the 
RetryCount to > 0 will tell the client library to retry the failed call in 
the event the Access token has been updated. This does not appear to be 
happening to me.... I am receiving the updated Access token and storing it, 
but the API call I make that instigates this update will throw  
AuthenticationError.OAUTH_TOKEN_INVALID and fail. I am thinking of manually 
catching that exception and retrying myself, but I have to wonder if there 
is a more graceful way... there must be something I am doing wrong... any 
thoughts out there?

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to