API V2 Expiration in Header set for 1970


#1

After making a GET to the metrics/meetings endpoint, the ‘Expires’ header shows Thu, 01 Jan 1970 00:00:00 GMT where I would expected it to show an expiration date equal to the exp value set during JWT generation. 

Am I interpreting that header attribtue incorrectly, or is there something wrong with the way I am setting the ‘exp’ value?   I am using pyjwt.

Here’s my Token generation code (in Python3).  ttl would be set to 3600 seconds: 

def generate\_jwt(ttl):
 # jwt payload
 jwt\_payload = {
 'iss': 'api\_key',
 'exp': datetime.utcnow() + timedelta(seconds=ttl)
 }

 # Encode signature and spit out a utf-8 string
 signature = str(jwt.encode(jwt\_payload, 'api\_secret', algorithm='HS256'), 'utf-8')

 return signature

 


#2

‘exp’ in your jwt is the value you set when you want the token to expire

The expiration in the response header would be related caching. I assuming it’s so far behind so that the client doesn’t cache it.


#3

Ah, that makes sense. Thank you!