You will need to persist the refresh token and account ID so your services can resume on their own in case of a restart. You can ceate valid AdwordsSession and AdwordsServices on the fly if you have these two fields.
Also, this might be of help: https://groups.google.com/forum/?fromgroups=#!topic/adwords-api/zf0slvrjkMs Oliver On Tuesday, October 9, 2012 5:08:03 PM UTC+1, j.e.frank wrote: > > I am trying to migrate to v201209 from v201109. I have several long-lived > services that use the AdWords API on behalf of my MCC account, for example > to run reports, to get ad details, and so forth. I'm trying to understand > how I should be using the new session/service objects, such that more than > one thing can be happening at once, but that I don't create a new session > or service object when I don't need to, and also that I use my OAuth2 > tokens appropriately (refresh if necessary but not every time I need to > make a call). I've seen several pieces of example code, but they are > self-contained so they always get a new session, new service object, > refresh the OAuth token, etc. Are there any examples more suitable for > long-running services that will be invoked from time to time? -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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
