Access token for event terminal expires

I have been using the “View events from a terminal” feature and the command:
curl https://api.particle.io/v1/devices/events?access_token=(redacted)

to feed events into a text file on my laptop which I then use for plotting the data in QGIS. It is scheduled on my laptop to issue the curl command every 1/2 hour and update the GIS maps accordingly. It all works well until the access token changes.
Is there a way to get a permanent access token to use with the curl command, or at least know when the access token will be changed?
thanks,
john

If you create an access token with an expiry time of 0 your get an eternal access token.

https://docs.particle.io/reference/device-cloud/api/#generate-an-access-token

ScruffR,
Thanks for the pointer. I was under the incorrect assumption that the token for getting the events in a terminal was a different token from that used for other access. My grasp of most of this stuff is pretty tenuous, so your quick response is much appreciated.
john

1 Like