Token expiry

Hi all,

Potentially stupid question here, but I will ask anyway.

I’ve finally got around to writing my own authentication process. When you exchange the authorization code for the access token, I receive, as expected, the “expires_in” argument which looks to be set at 107999.

Now assuming this is in seconds, that is just under 30 hours. The API guide states tokens are valid for several hours.

Has the token expire time been increased, or is it set at 30 hours because its a confidential client?

I have no issues either way, just trying to clarify when I should be refreshing my token.


The confidential client expires in 107999 seconds…

Non-confidential expires much quicker… I’ve always had 107999 for confidential so refresh just before 30 hours… :slight_smile:

Out of interest, what have you written it in?

1 Like

Thanks, I will schedule in my refresh for 29 hours :slight_smile:

It’s in PHP. I handle the initial authentication via browser which once authenticated stores the credentials in MySQL, and then back end PHP scripts take over and pull all my transactional data into a table on a schedule.

I’m not entirely sure what I’m going to do with the masses of transactional data I have yet, but for now I’ve overlayed the countries I visit on to Google Maps:

1 Like

Nice one! Will you open source it onto GitHub?

I have done some work with the new receipts API and can now go to a web link, select my transaction and add a digital receipt :slight_smile:

I just need to make it streamlined and then I was going to open source it :slight_smile: if you want to collab let me know :slight_smile:

I will at some point.

At the minute my code is very much in the “write it and make it work stage” so it’s not very pretty :smiley:

Receipt page sounds good actually. I travel a lot on business and therefore need my receipts for expenses, uploading them would be handy…