This is super awesome, definitely borrowing this to send a text push notification
Edit: isn’t this super costly for personal use?
Edit: isn’t this super costly for personal use?
Not really ... I notice twilio deducting USD $9 every 10 or 12 days ? It's a business expense.
I also 'lookup' numbers to check if they are mobile or not:
curl -s -X GET "https://lookups.twilio.com/v1/PhoneNumbers/$number?Type=carrier&Type=caller-name" -u $accountsid:$authtoken | /usr/local/bin/jq '.'
... which is handy. Usually shows their name and carrier ID as well.As you can see, I pipe it through 'jq' because that's what all the cool kids do.
And if you're doing this before you try to SMS them, you can skip the lookup entirely, if it's a landline you'll just get an error back.
(I work at a company that uses Twilio heavily and it's full of this sort of microoptimization)