---
title: Auth JWT actions
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/auth/auth-jwt-create
---

This page provides a comprehensive reference for authentication actions available in the workflow automation actions catalog. These actions enable you to create and manage JSON Web Tokens (JWT) for secure authentication in your workflows.

## Create a JSON Web Token [#auth-jwt-create]

Create a JSON Web Token

### Inputs

| Input Field               | Type    | Description                                                                                                                                                                                                                                                              | Example                                  |
| ------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------- |
| **algorithm**             | String  | Algorithm used to sign the token.                                                                                                                                                                                                                                        | RS256 Supported algorithms: RS256 ,ES256 |
| **privateKey**            | String  | The private key for signing a JWT. - RS256 supports private key in `PKCS#8` & `PKCS#1` format. ES256 supports private key in `PKCS#8` (.p8) format. - Private Key must be provided as a secret expression. - PrivateKey must be stored as single line string in Secrets. | `${{ :secrets:namespace:privateKey }}`   |
| **headers**               | Map     | Headers provides metadata for JWT UnSupported headers: nested objects, arrays, null are not supported                                                                                                                                                                    | `{"kid": "key-2025-09"}`                 |
| **claims**                | Map     | Claims are statements about an entity (typically, the user) and additional data Unsupported Claim Types: null, Nested objects / arbitrary maps, Lists containing non-strings or mixed types.                                                                             | `{"role": "admin", "scope": "read:all"}` |
| **expirationTimeMinutes** | Int     | Expiration time in minutes Expiration time should be greater than 0 and less than 30days.                                                                                                                                                                                | 10                                       |
| **includeIssuedAt**       | Boolean | Issued At timestamp. **Default**: `true`                                                                                                                                                                                                                                 | true                                     |
| **selectors**             | List    |                                                                                                                                                                                                                                                                          | `[name: token, expression: .jwt]`        |

### Outputs

| Output Field     | Type    | Description                                      |
| ---------------- | ------- | ------------------------------------------------ |
| **success**      | Boolean | `true/false`                                     |
| **jwt**          | String  | `"xxxxx.yyyyy.zzzzz"`                            |
| **errorMessage** | String  | `"Unsupported algorithm for creating jwt token"` |

### Example

```yaml
name: create-json-web-token
description: ""
steps:
  - name: auth_jwt_create_1
    type: action
    action: auth.jwt.create
    version: "1"
    inputs:
      algorithm: RS256
      privateKey: ${{ :secrets:namespace:privatekey}}
      headers:
        header1: value1
      claims:
        claim1: value1
      expirationTimeMinutes: 10
    next: end
```
