Get new refresh token after expiration

724 views
Skip to first unread message

Adam Haining

unread,
Feb 7, 2017, 2:32:58 PM2/7/17
to AdWords API Forum
I'm using the newest version of the PHP Adwords API (v201609) and I'm having trouble getting a new refresh_token/access_code after my initial refresh_token expires.  The problem might be that I am attempting to get a new refresh token after it has already expired.  Do I need to do this before it expires?  In my experience, once it expires, I can still use the refresh token to get a new one without any problems after it has expired.  I've been scouring everything I can.  The documentation claims that the library will automatically get a new token for you, but I have not been able to figure out where or how.  Please provide some tips, or if possible, some example code.  This is the one thing that is preventing me from upgrading my codebase to the new API right now.  Thanks!

Shwetha Vastrad (AdWords API Team)

unread,
Feb 7, 2017, 4:00:43 PM2/7/17
to AdWords API Forum
Hi Adam,

If your access token has expired, you'll be able to use your refresh token to generate a new access token. On the other hand, if your refresh token has expired (which could happen for various reasons), you'll need to reauthorize the application and generate a new refresh token by following the instructions provided here. Once you have provided these details in the configuration file, the client library will automatically refresh expired access tokens. If this doesn't work, could you provide the details of the error you encounter? Please use Reply privately to author when responding. 

Regards,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages