Creating Twilio SMS Confirmation for Consent
You can create SMS confirmation for a data subject when logging their consent with Twilio.
This is not intended to be a comprehensive guide on how to set up or use Twilio. You may need specialized permissions in order to set up and use this integration. Please consult your organization's Twilio administrator and documentation for the most up-to-date information. For more information about Twilio APIs, please see Twilio Docs.
To create a Twilio account
To authenticate Twilio with OneTrust
Enter Credential Details Screen Reference
- Field
- Description
- Credential name
-
Enter a name for the new credential.
- Description
-
Enter a description for the new credential.
- Application type
-
Select a connector type option from the following options:
-
Web app
-
Encryption
-
File share
-
Database
-
Decryption
-
Cloud SDK
-
- Authentication method
-
Select the applicable authentication type required for your web app integration.
- Protocol
-
Defaults to HTTPS.
- Hostname
-
Enter the hostname for the credential. When a credential is associated to a workflow action, the hostname will be the default domain for this action. If a previous domain has been specified on the action, the hostname will replace that domain.
- Key (Enter default headers)
-
Select the type of key which should be used in the header of the call made by the connection. You can add additional keys if your credential requires more than one header.
- Value (Enter default headers)
-
Enter the value of the key which should be used in the header of the call made by the connection.
- Token
-
Provide a token value for the credential.
- Allow Mutual Transport Layer Security (mTLS)
-
Enable mutual transport layer security (mTLS) for all credentials using the Web App connector type to establish secure and trusted connections with external servers. This only applies to outbound connections made by actions in integration workflows which use this credential type.
For more information, see Setting Up Mutual Transport Layer Security.
- Server certificate chain
-
Post a custom server certificate to any HTTPS credential to establish a secure and trusted connection with external systems not using a certificate issued by a trusted authority.
- Test settings (recommended)
-
Enter an URL and test it to verify the credentials.
- Classify as sensitive
-
Enable this setting if the credentials will be used in a sensitive workflow.
For more information, see Configuring Integration Credentials.
To create an integration workflow for Twilio
Integration Builder Block Reference
- Field
- Description
- Request URL
-
Enter the Request URL, ensuring it follows this format:
https://api.twilio.com/2010-04-01/Accounts/{TwilioUsername}/Messages.json - Method
-
Select POST.
- Header(s)
-
Select Content-Type. Enter
application/x-www-form-urlencodedin the field on the right. - Body
-
Copy this text and paste it into the Body field:
PYTHON<#assign magictoken= (event.payload.contact.MagicLink)?url('UTF-8')> <#assign magiclink ='Your consent has been received successfully! You can manage your preferences from the following link: https://privacyportaltrial.onetrust.com/ui/#/preferences/token/7144f28e-19e5-479f-b9d3-bcf0ccc3dada/${magictoken}'> <#assign to=(event.payload.contact.Mobile)> <#assign from='+447723473901'> Body=${magiclink?url('UTF-8')}&To=${to?url('UTF-8')}&From=${from?url('UTF-8')}Replace the URL with the magic link URL from the Integrations tab in your organization's Preference center menu.
Replace the phone number with your Twilio Trial Number.
Edit the SMS content to fit your organization's needs.