Back to Zitadel

Serviceaccount Jwt

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

5.0.0-base1.5 KB
Original Source
  1. Go to the Users tab in your organization as shown below and click on the Service Accounts tab.

  1. To add a service account, click on the New button.

  1. Next, add the details of the service account and select either Bearer or JWT for Access Token Type and click on Create. For this example, we will select JWT.

  1. Now you will see the saved details.

  1. Next, we need to generate a private-public key pair in ZITADEL and you must get the private key to sign your JWT. Go to Keys and click on New.

  1. Select type JSON and click Add.

  1. Download the key by clicking Download. After the download, click Close.

  1. You will see the following screen afterward.

  1. The downloaded key will be of the following format:
{
    "type":"serviceaccount",
    "keyId":"<YOUR_KEY_ID>",
    "key":"-----BEGIN RSA PRIVATE KEY-----\n<YOUR_KEY>\n-----END RSA PRIVATE KEY-----\n",
    "userId":"<YOUR_USER_ID>"
}