Twilio offers a pretty awesome Lookup API to enrich phone numbers with metadata: it can distinguish mobile and landline numbers (Sales will thank you!), determine carrier (which has demographic significance, like it or not), and even do reverse Caller ID lookup.
It's reasonably priced, and if anyone knows this stuff, it's Twilio.
The weird thing is that even though the Lookup API is 100% webhook-compatible, their docs don't show it being called as a simple webhook request. They only show it in the context of Java, PHP, or other code.
Anyway, here's what's needed to call it as a webhook.
Lookup requests are authenticated using HTTP Basic Auth. Your Twilio Account SID is the username; your Account Token is the password.
So you just need to create an HTTP
Authorization header and then add it to the webhook definition in Marketo. (Marketo supports Basic Auth just fine, but it doesn't present you with distinct username and password boxes.)
Authorization header for Basic auth looks like
Authorization: Basic <base64(<username>:<password>)>
<base64(<username>:<password>)> means simply
- concatenate the username and the password with a colon
- Base64-encode the concatenated string