Hi, @Davec!
So, you’re saying you need to get those tokens from other functions, instead of when you receive an event, right?
Saving the SmartApp context should help you out, here are some examples:
- Directly in the ST repo: https://github.com/SmartThingsCommunity/api-app-minimal-example-js/blob/master/server.js#L84
- Endpoint SmartApps with File Store Contexts
- SmartThings SDK Subscribing to Devices Dynamically - #6 by nayelyz
Please, let me know if you have any questions.