Hi,

OAuth2 tokens expire in typically an hour, that's by design. What you could 
do is to generate OAuth2 tokens with offline=true. This will give you an 
access token (that expires in an hour), and a refresh token (doesn't 
expire, can be used to obtain an access token). 
https://developers.google.com/accounts/docs/OAuth2WebServer#offline talks 
about how this is done, but the actual steps may vary based on the library 
you use, and you should ask it on the AdSense API forum / the library forum.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Tuesday, May 21, 2013 10:57:42 AM UTC+5:30, [email protected] wrote:
>
> Hi Dustin,
>
> Ddi you find how to obtain tokens that don't expire?
>
> Thanks,
> Stan
>
> On Monday, March 25, 2013 5:23:05 PM UTC+2, Dustin Davis wrote:
>>
>> I've set up a django project which show various revenue stats for our 
>> company. As part of this I am getting our adsense revenue via the API. I 
>> documented what I did on my blog: 
>> http://www.nerdydork.com/python-django-google-adsense-api.html
>>
>> The problem I am having is that the credentials expire. It seems I have 
>> to do the OAuth2 handshake in my browser every day to keep it running or 
>> else I'll get an invalid grant error. Is there a way to not have the oauth 
>> handshake expire?
>>
>> Thanks,
>> Dustin
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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

--- 
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].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to