Closed Roedy13 closed 3 months ago
Hi, unsure why you're seeing this behaviour. The Vonage JWT library sets a default expiry time from the iat
time set every time the method is called. Can you provide a code example so I can reproduce the issue?
Closing as no activity
I'm creating a client with a private key and application ID. Instead of a creating a new client for each message, the client object is reused. I added print statements into the code and verified that for every request, a new JWT is generated with a new JTI, ITA, and EXP. After 15 minutes, sending a message errors out with an Authorization Error. I noticed that the expiration time of the JWT is 15 minutes, but since the client is generating a new JWT for each request, I did not expect an authorization error.
Expected Behavior
The authorization should not fail after 15 minutes
Possible Solution
A workaround is to create a new client object for each request.
Steps to Reproduce (for bugs)
Context
Just trying to send a message
Your Environment
Version used: Python 3.10.10 vonage==3.13.1 vonage-jwt==1.1.0
Operating System and version: seen in Windows 11, python:3.10.10-slim-bullseye container