---
schema_version: "1"
id: 7651c2b236a77567df7faa457df8d3eed2ae79c0699ea270740f61e35f4d37e2
title: Encode with JWT Signing Secret
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-app-development/encode-custom-activities-using-jwt-app-signature.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/encode-custom-activities-using-jwt-app-signature.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: becba16b112564bbdcd80d6f006460aa4ad2a642978740336b9db4feb6125eea
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Encode with JWT Signing Secret

## How to Get a JWT

Journey Builder uses the JWT Signing Secret from the package containing the activity as the default signing key for the JWT.

## How to Add a JWT to an Activity

Set `"useJwt": true` in the activity's arguments for each call (save, validate, publish, execute) for which you wish to receive a JWT. If you don't include a `customerKey`, Journey Builder uses the JWT Signing Secret to verify the JWT.

If you are using the External Key as the signing key, then `customerKey` is required.

## Sample Journey

```json
var ixn = {
    "id": "...",
    "key": "...",
    "name": "My journey",
    "version": 1,
    "workflowApiVersion": 1,
    "activities": [
        {
            "key": "REST-1",
            "name": "Custom REST Activity",
            "type": "REST",
            "outcomes": [
                {
                    "next": null
                }
            ],
            "arguments": {
                "execute": {
                    "inArguments": [
                        {
                            "message": "someMessage"
                        }
                    ],
                    "outArguments": [],
                    "url": "https://example.com/post.php?dir=et_rest_activity_execute",
                    "body": "{email-body}",
                    "header": "",
                    "useJwt": true,
                    "timeout": 10000
                }
            },
            "configurationArguments": {
                "save": {
                    "url": "https://example.com/post.php?dir=et_rest_activity_save",
                    "body": "",
                    "header": "",
                    "useJwt": true,
                },
                "validate": {
                    "url": "https://example.com/post.php?dir=et_rest_activity_validate",
                    "body": "",
                    "header": "",
                    "useJwt": true,
                },
                "publish": {
                    "url": "https://example.com/post.php?dir=et_rest_activity_publish",
                    "body": "",
                    "header": "",
                    "useJwt": true,
                }
            },
            "metaData": {
                "isConfigured": true
            }
        }
    ],
    "triggers": [],
    "goals": [],
    "entryMode": "SingleEntryAcrossAllVersions",
    "executionMode": "Production",
    "status": "Draft"
};
```

## Related Items

[Encode with Customer Key](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/encode-custom-activities-using-jwt-customer-key.md)
