> I guess it would have to try and see if the access token is expired first? and if so grab a new one then make the hit. Is that the recommended setup?
Exactly. The token expires after 15 minutes, so you need to check the response and issue a new token should it have expired. You can read our docs on how to do that or take a look at our Go SDK [0] and re-implement it in Python. Unfortunately, I don't have enough time to provide one right now.
> Would I be able to pass extra information to be included in the logs, like e.g. username?
That's not possible right now, but you will be able to send custom events in the future.
> But what are your thoughts on how possible is it for these requests to be intercepted and this logged data siphoned off by someone else?
Highly unlikely. All traffic is SSL encrypted, the internal communication of our server cluster is encrypted, the database, ... I mean, software can always be hacked, but I spend a lot of my time on infrastructure and security.
[0] https://github.com/pirsch-analytics/pirsch-go-sdk/blob/maste...