# API V2 Expiration in Header set for 1970

**URL:** <https://devforum.zoom.us/t/api-v2-expiration-in-header-set-for-1970/788>\
**Category:** API and Webhooks\
**Created:** [November 21, 2017, 1:33am UTC](https://devforum.zoom.us/t/api-v2-expiration-in-header-set-for-1970/788 "2017-11-21T01:33:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Rogers](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/matt_rogers/32/189_2.png) [@Matt\_Rogers](https://devforum.zoom.us/u/Matt_Rogers)\
**Post date:** [November 21, 2017, 1:33am UTC](https://devforum.zoom.us/t/api-v2-expiration-in-header-set-for-1970/788/1 "2017-11-21T01:33:29Z")

</div>

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.&nbsp;

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

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

```
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

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![Joshua\_Woodward1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/joshua_woodward1/32/1480_2.png) [@Joshua\_Woodward1](https://devforum.zoom.us/u/Joshua_Woodward1)\
**Post date:** [December 5, 2017, 7:20pm UTC](https://devforum.zoom.us/t/api-v2-expiration-in-header-set-for-1970/788/2 "2017-12-05T19:20:34Z")

</div>

‘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.

---

<div class="post-metadata">

**Author:** ![Matt\_Rogers](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/matt_rogers/32/189_2.png) [@Matt\_Rogers](https://devforum.zoom.us/u/Matt_Rogers)\
**Post date:** [December 5, 2017, 8:15pm UTC](https://devforum.zoom.us/t/api-v2-expiration-in-header-set-for-1970/788/3 "2017-12-05T20:15:23Z")

</div>

Ah, that makes sense. Thank you!
