How to Keep Authorization Token Alive for 30 days or 180 days

376 views
Skip to first unread message

ritesh1...@gmail.com

unread,
Dec 5, 2017, 6:27:37 PM12/5/17
to AdWords API Forum
Hi

I have got refresh token from Google Adword  by using GoogleAdword API Playground. 
I am not using any client library like PHP, ruby or JAVA. We are using our own code which combination of different tech stack

All i am looking is how can i generate a Access token( Authorization: Bearer xxxxx) which will last for 180 days or 30 Days based on my refresh token

Is it possible to use PHP library and generate token ( ( Authorization: Bearer xxxxx)  for 180 days? or any other way to generate token for n number of days?

Please provide some information on this. All i know from documentation that there is expire_in which helps to do that

Please provide some light here

Regards
Ritesh
Message has been deleted

Peter Oliquino

unread,
Dec 6, 2017, 2:54:16 AM12/6/17
to AdWords API Forum
Hi Ritesh,

You may refer to this section of our OAuth2 guide on how to manually generate or request for access tokens if you are not using any of the available client libraries. Additionally, I'm afraid that you will not be able to manually set an expiration date for your access token and you will need to refresh it as soon as it expires as indicated in the expires_in value.

However, as stated also in this section, if you use any of our supported client libraries, then you will no longer need to manually request for access tokens as they are automatically refreshed each time you make a request using the client library.

Thanks and regards,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages