# How to generate JWT for API call using HTTP?

**URL:** <https://community.auth0.com/t/how-to-generate-jwt-for-api-call-using-http/94968>\
**Category:** JWT.io\
**Created:** [November 23, 2022, 8:18am UTC](https://community.auth0.com/t/how-to-generate-jwt-for-api-call-using-http/94968 "2022-11-23T08:18:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmyuph](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gmyuph/32/41455_2.png) [@gmyuph](https://community.auth0.com/u/gmyuph)\
**Post date:** [November 23, 2022, 8:18am UTC](https://community.auth0.com/t/how-to-generate-jwt-for-api-call-using-http/94968/1 "2022-11-23T08:18:34Z")

</div>

Hello there, I am not a hard-core programmer. I would just want to use the App Store Connect API to automatically download reports. But they use JWT for authentication. I usually just use a normal HTTP call for API calls - headers, query strings, body, and all that. The API needs the JWT token as part of the header. How do I automatically generate the JWT? I’m thinking using the [jwt.io](http://jwt.io). Is there a [jwt.io](http://jwt.io) API I can call to generate JWTs?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 28, 2022, 8:49pm UTC](https://community.auth0.com/t/how-to-generate-jwt-for-api-call-using-http/94968/3 "2022-11-28T20:49:50Z")

</div>

Hi @gmyuph,

Welcome to the Auth0 Community!

A JWT is often issued to you. Do you have some docs that describe the API you are trying to access?

---

<div class="post-metadata">

**Author:** ![gmyuph](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gmyuph/32/41455_2.png) [@gmyuph](https://community.auth0.com/u/gmyuph)\
**Post date:** [November 28, 2022, 11:30pm UTC](https://community.auth0.com/t/how-to-generate-jwt-for-api-call-using-http/94968/4 "2022-11-28T23:30:06Z")

</div>

Hi Dan,  
I’m trying to connect to the App Store Connect API.  
Apparently, they use a JWT.  
[https://developer.apple.com/documentation/appstoreconnectapi](https://developer.apple.com/documentation/appstoreconnectapi)

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 29, 2022, 2:26pm UTC](https://community.auth0.com/t/how-to-generate-jwt-for-api-call-using-http/94968/5 "2022-11-29T14:26:42Z")

</div>

I wasn’t able to generate it with the GUI.

This doc shows you how to do it with openssl commands in a terminal, would that work?

> **[Generate a JWT with ECDSA keys](https://techdocs.akamai.com/iot-token-access-control/docs/generate-jwt-ecdsa-keys)**
>
> To generate a JWT signed with the ES256 algorithm and ECDSA keys using the P-256 (secp256k1) curve, you need to use openssl commands or the auth0 library. This procedure explains how to generate a JWT with openssl commands. A JWT consists of three...

---

<div class="post-metadata">

**Author:** ![gmyuph](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gmyuph/32/41455_2.png) [@gmyuph](https://community.auth0.com/u/gmyuph)\
**Post date:** [November 30, 2022, 5:49am UTC](https://community.auth0.com/t/how-to-generate-jwt-for-api-call-using-http/94968/6 "2022-11-30T05:49:41Z")

</div>

I see. Thank you for your help. I truly appreciate it.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 30, 2022, 2:25pm UTC](https://community.auth0.com/t/how-to-generate-jwt-for-api-call-using-http/94968/7 "2022-11-30T14:25:35Z")

</div>

No problem! Let us know if you have any questions.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 30, 2023, 9:36pm UTC](https://community.auth0.com/t/how-to-generate-jwt-for-api-call-using-http/94968/8 "2023-01-30T21:36:56Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
