I am using LWA as my oauth2 provider and need to send change reports when my contact sensors change state. Because of LWA account linking I've determined that I will have to store access and refresh tokens in a database from my skill. If that's the case, then the only way to send a report is to have my server send data to the skill which sends the actual directive to the endpoint. If that is the case, how do I create a separate trigger or function that will receive data from my server, repackage it and send to the endpoint?
And if the best way to do this is to have my server contact the endpoint directly, which seems more elegant to me, how would I get the necessary tokens or auth code to my server for storage?