# Kong expose 3rd party downstream API using JWT to authenticate

**URL:** <https://discuss.konghq.com/t/kong-expose-3rd-party-downstream-api-using-jwt-to-authenticate/8597>\
**Category:** Questions\
**Created:** [June 25, 2021, 6:08am UTC](https://discuss.konghq.com/t/kong-expose-3rd-party-downstream-api-using-jwt-to-authenticate/8597 "2021-06-25T06:08:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahebpreet](https://avatars.discourse-cdn.com/v4/letter/s/d2c977/32.png) [@sahebpreet](https://discuss.konghq.com/u/sahebpreet)\
**Post date:** [June 25, 2021, 6:08am UTC](https://discuss.konghq.com/t/kong-expose-3rd-party-downstream-api-using-jwt-to-authenticate/8597/1 "2021-06-25T06:08:40Z")

</div>

There is a 3rd party API, which requires API authentication for the application calling it using JWT token with refresh mechanism. The JWT token is for the application ( like client secret and key) and needs to be sent with each request, it will be the same for all the requests.

In Kong, it’s possible to add a static header to the downstream request and fetch the response. Is it possible to generate a JWT token at the kong level and add it to the downstream request, when the token expires?

I tried finding out on StackOverflow and kong documentation and found a lot of plugins for acting as an authentication layer for downstream services. I also understand that API gateways are generally not responsible for authenticating themselves to the downstream services, I was wondering if its possible in this case, this will help us not to write a new applicaiton just to generate tokens and expose 3rd party API for the time being.

Thanks  
Saheb Preet Singh
