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 

1var ixn = {
2    "id": "...",
3    "key": "...",
4    "name": "My journey",
5    "version": 1,
6    "workflowApiVersion": 1,
7    "activities": [
8        {
9            "key": "REST-1",
10            "name": "Custom REST Activity",
11            "type": "REST",
12            "outcomes": [
13                {
14                    "next": null
15                }
16            ],
17            "arguments": {
18                "execute": {
19                    "inArguments": [
20                        {
21                            "message": "someMessage"
22                        }
23                    ],
24                    "outArguments": [],
25                    "url": "https://example.com/post.php?dir=et_rest_activity_execute",
26                    "body": "{email-body}",
27                    "header": "",
28                    "useJwt": true,
29                    "timeout": 10000
30                }
31            },
32            "configurationArguments": {
33                "save": {
34                    "url": "https://example.com/post.php?dir=et_rest_activity_save",
35                    "body": "",
36                    "header": "",
37                    "useJwt": true,
38                },
39                "validate": {
40                    "url": "https://example.com/post.php?dir=et_rest_activity_validate",
41                    "body": "",
42                    "header": "",
43                    "useJwt": true,
44                },
45                "publish": {
46                    "url": "https://example.com/post.php?dir=et_rest_activity_publish",
47                    "body": "",
48                    "header": "",
49                    "useJwt": true,
50                }
51            },
52            "metaData": {
53                "isConfigured": true
54            }
55        }
56    ],
57    "triggers": [],
58    "goals": [],
59    "entryMode": "SingleEntryAcrossAllVersions",
60    "executionMode": "Production",
61    "status": "Draft"
62};

Related Items 

Encode with Customer Key