---
schema_version: "1"
id: 2098bb41bd8dc44a689285d881088fff50deca2ffeb8a72d83ce438ac6dc0678
title: Encode Custom Activities Using a JWT
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.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/encode-custom-activities-using-jwt.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: e8c266e1fc41f5e21fe6cd204e47f86834d4293030864c2840ee67b51808dc57
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Encode Custom Activities Using a JWT

Marketing Cloud Engagement uses JSON Web Tokens (JWTs) to validate the identity of API calls to your custom activities. Use a JWT for activities that retrieve sensitive data or perform sensitive actions.

JWTs are encoded, but they aren’t encrypted. Encryption is handled at the transport layer using Secure Sockets Layer (SSL). To use a JWT, your application must have SSL enabled.

When your application calls the API, Marketing Cloud Engagement posts the encoded JWT to the activity’s endpoint. The JWT lets your application know that the user calling the API is an authorized user.

You can obtain a JWT by providing your customer key. Alternatively, you can use your JWT signing secret as a signing key.

## Customer Key

Use an external key the signing key. Pass the external key into the `customerKey` field in the body of the custom activity request. (The external key and customer key are synonyms.)

## JWT Signing Secret

You can use the JWT Signing Secret for your application as a fallback signing key. Use this method when the `customerKey` isn’t included in the custom activity request body. This method is helpful in situations where an integration partner hosts an application used by multiple users. By passing the Signing Secret, you can determine the origin of a custom activity request.

## Related Items

- [Encode with Customer Key](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/encode-custom-activities-using-jwt-customer-key.md)
- [Encode with JWT Signing Secret](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/encode-custom-activities-using-jwt-app-signature.md)
