Overview
When attempting to configure and test Twilio Verify, an error occurs with the description:
Guardian - Error on send-phone-message-hook: 60204 Custom code not allowed
Example of what the tenant log might shows:
{
"date": "[...]",
"type": "gd_send_sms_failure",
"description": "Guardian - Error on send-phone-message-hook: 60204 Custom code not allowed",
"ip": "[...]",
"user_agent": "[...],
"user_id": "[...]",
"details": {
"request": {
"method": "POST",
"path": "/api/sms/configs/[...]/authenticators/[...]/challenge",
"query": {},
"userAgent": "[...]",
"body": {
"client_id": "[...]",
"render_locale": "[...]",
"originHost": "[...]",
"is_free_tenant": "[...]"
},
"ip": "...",
"auth": {
"strategy": "jwt_api2_internal_token_with_tenant",
"scopes": [
"..."
]
}
},
"response": {},
"enrollment": {},
"failure_details": {
"errorCode": 60204,
"message": "Custom code not allowed"
},
"actions": {
"executions": [
"nkxHQyu6TZy5_OdPsHTRuTIwMjQwNTE2"
]
},
"device_id": "..."
},
"log_id": "...",
"_id": "...",
"isMobile": ...,
"id": "..."
}
Cause
This error is coming from Twilio and will occur when an SMS with a custom message is made on an account that does not have Custom Messages enabled on the Twilio side. See more details in the following Twilio documentation: custom_message_not_allowed.
Solution
Please reach out to Twilio Support for any assistance in enabling Custom Messages.
While, at the moment, there is no out-of-the-box integration for Twilio Verify, Twilio has a guide to set it up at the following link: How to configure Auth0 MFA using Twilio Verify.