54051: Invalid webhook URL
SYNC
ERROR
Twilio returns this error when you set the WebhookUrl for a Sync Service to a value that is not a valid URI or is longer than 512 characters. Sync uses this URL when Sync objects are manipulated, and you can also enable webhook delivery for REST API-triggered events with webhooks_from_rest_enabled.
- The
WebhookUrlvalue is not a correctly formatted absolute URL. The Sync Service resource expects astring<uri>value for this parameter. - You sent the request as
application/x-www-form-urlencodedand did not percent-encode theWebhookUrlvalue correctly. - The
WebhookUrlvalue is longer than 512 characters. - You supplied a relative or incomplete URL instead of a fully qualified webhook endpoint. Twilio examples use absolute webhook URLs such as
https://example.com/sync.
- Set
WebhookUrlto a fully qualifiedhttp://orhttps://URL that Twilio can call for Sync webhook events. - If you build the HTTP request yourself, percent-encode the
WebhookUrlvalue in theapplication/x-www-form-urlencodedrequest body before you send it. - Keep the
WebhookUrlvalue at 512 characters or fewer. - Create or update the Sync Service with a valid
WebhookUrlfirst, then enablewebhooks_from_rest_enabledif you want Sync to send webhooks for REST API-initiated changes.