Back to Zitadel

App Jwt

apps/docs/content/examples/imports/_app_jwt.mdx

5.0.0-base1.8 KB
Original Source
  1. Go to your Project and click on the New button as shown below.

  1. Give a name to your application (Test API is the name given below) and select type API.

  1. Select JWT as the authentication method and click Continue.

  1. Now review your settings and click Create.

  1. You will now see the API’s Client ID. You will not see a Client Secret because we are using a private JWT key.

  1. Next, we must create the key pairs. Click on New.

  1. Select JSON as the type of key. You can also set an expiration time for the key or leave it empty. Click on Add.

  1. Download the created key by clicking the Download button and then click Close.

  1. The key will be downloaded.

  1. When you click on URLs on the left, you will see the relevant OIDC URLs. Note down the issuer URL, token_endpoint and introspection_endpoint.

  1. The key that you downloaded will be of the following format.
{
  "type":"application",
  "keyId":"<YOUR_KEY_ID>",
  "key":"-----BEGIN RSA PRIVATE KEY-----\<YOUR_PRIVATE_KEY>\n-----END RSA PRIVATE KEY-----\n",
  "appId":"<YOUR_APP_ID>",
  "clientId":"<YOUR_CLIENT_ID>"
}
  1. Also note down the Project ID of your project.