Hi Jason, As mentioned over email, could you open an issue at http://code.google.com/p/google-api-adwords-dotnet/issues/list? I have a fix for the issue, and I'll update the library at the earliest. Thanks for pointing out the issue and helping me narrow the source of the issue.
Cheers, Anash P. Oommen, AdWords API Advisor. On Saturday, 25 August 2012 03:54:36 UTC+5:30, Jason Bukowski wrote: > > For any and all who are interested, I think I've solved this problem. The > tokens were bring refreshed, and they were being stored correctly through > OnOAuthTokensObtained. The problem was that the configured retries were not > using the new access token that had been received. > > I downloaded the source and noticed that the authorization header was > being set outside of the retry loop in AdWordsSoapClient.MakeApiCall(). I > moved that assignment into AdsSoapClient.MakeApiCall(), within the retry > while loop. With that change, the OAuthHeader is assigned the most current > value, on every APIcall, and on every retry. > > On Thursday, August 23, 2012 2:01:05 AM UTC-4, Anash P. Oommen wrote: >> >> Hi Jason, >> >> This could be an issue with the library, but I need to confirm. Could you >> set the following keys in your App.config and confirm if the library is in >> fact using the updated credentials after refreshing the calls? >> >> <add key="LogErrorsOnly" value="true"/> >> >> and mail the logs to anash.p...@google.com? >> >> Thanks, >> Anash P. Oommen, >> AdWords API Advisor. >> >> On Wednesday, 22 August 2012 09:35:40 UTC+5:30, Jason Bukowski wrote: >>> >>> 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