I am trying to set up the integration between Twilio SMS and Marketo using the webhook documentation.
We also use a shortcode to currently send messages. I followed the documentation and received the following error: url must not contain invalid chars or json
Is this because we are using a shortcode versus a full phone number? Thanks in advanced!
Solved! Go to Solution.
Can't say that's so easy to read, but it looks like you're trying to embed basic auth credentials in the URL. Don't do it that way: add a proper Authorization: header instead, and set your URL to simply
https://api.twilio.com/2010-04-01/Accounts/{:your_account_sid}/Messages.json
I described an easy method for generating the header in this post way back when:
Please show your exact webhook setup, preferably copying-and-pasting the Payload contents and highlighting them as JavaScript using the Insert Code Sample feature here on the community.
(You may also include a screenshot, but please provide the actual text so we can inspect it including all original whitespace.)
https://[ACCOUNT_SID]:[AUTH_TOKEN]@API.TWILIO.COM/2010-04-
01/ACCOUNTS/[ACCOUNT_SID]/SMS/MESSAGES.XML
From=%2B1[MY_TWILIO_NUMBER]&To=%2B1{{lead.Mobile Phone Number:default=edit me}}&Body=YOUR
MESSAGE
These are the two urls I used for the webhook
We use a shortcode: 95578 instead of a 9 digit number
These are the two urls I used for the webhook
Only one of those is a URL, the second is presumably your webhook request payload.
What do you have set as the request and response encodings in the webhook definition? And the method (GET or POST)?
Here is how the webhook is currently set up in Marketo. When I go to trigger a campaign I get the 404 error: URL not found.
Can't say that's so easy to read, but it looks like you're trying to embed basic auth credentials in the URL. Don't do it that way: add a proper Authorization: header instead, and set your URL to simply
https://api.twilio.com/2010-04-01/Accounts/{:your_account_sid}/Messages.json
I described an easy method for generating the header in this post way back when: