Playground API Token - Expiry Time


#1

Hi guys,

Sorry if this is in the wrong place.
The authorisation token in the API playground, how long does this last until it expires?

I’ve created an Android widget with the help of Tasker and Kustom to show my balance on the home screen and I’m using the authorisation token from the playground (possibly shouldn’t). If it is a short lived expiry time I may need to rethink my options.

It would be nice if we could generate an authorisation token without needing to go through the full OAuth process to make it possible to create widgets and the like for personal use and hard code the token.
The apps. I use to create the widget don’t support complex authentication like this, hence hard coding it.
Or is there another way to go about this?

Thanks.


(Kolok) #2

@HughWells is probably the best to answer this.


(Adam Williams) #3

It’s about a day, IIRC


(Emma Vanbrabant) #4

I wrote an android widget myself with our public API a while back - it handles the OAuth flow and is open source, if you want a reference of how to go about it: https://github.com/emmaguy/monzo-widget


(Tom Halloran) #5

I think the playground token is only a couple of hours.

You’ll have to setup the full OAuth process if you want to keep permanent access to your account (i.e. a confidential client, using refresh tokens)