Description
I have a local setup of JWT app listening to the “Meeting End” event with ngrok. It works as expected except occasional “Access token is expired” error. If I restart the app it works again without any issues.
Error
The full error message or issue you are running into.
Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT with Webhook
Which Endpoint/s?
past_meeting.get_participants
Additional context
The app works fine mostly except occasional “Access token is expired” errors.
I’m new to JWT and APIs. I have enabled webhooks inside the JWT app. I think the token is set to expire every 90 mins. I want to listen to the “Meeting Ended” events at the account level that’s why I went with JWT app.
I was under the assumption that using the JWT app would mean I don’t have to worry about a token refresh of expiry? Do you think the token is getting expired is causing the issue? Can you point me to some documentation that talks about how to handle expiring jwt tokens?
I’m happy to help out here! First, please see our documentation on using a JWT App. As you can see in our payload section you can generate your own JWT token where you set the expiration using an Epoch timestamp.
Using the API Key and API Secret from the JWT App that you create allows you to generate JWT Tokens to call the API as needed. A common use case is to have a longer expiration for testing and then use short expirations in production.
A good way to build a custom JWT token for testing is with the JWT.io debugger. That keeps all your information client side (on your computer) so it’s safe to add your API Key and Secret there.
I usually use something like Epoch Converter for the timestamp .
When it comes to production, you would want to write code to generate these JWT tokens as needed.