Last active
February 24, 2021 04:20
-
-
Save xbalaji/f0cdaba041cae48ce62fc696f94b68c6 to your computer and use it in GitHub Desktop.
oneliners-twilio.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://support.twilio.com/hc/en-us/articles/223136027-Auth-Tokens-and-How-to-Change-Them | |
export TWILIO_ACCOUNT_SID="AC..." | |
export TWILIO_AUTH_TOKEN="e3.." | |
twilio-phone-get() | |
{ | |
num=$(echo ${*} | tr -d [:space:]) | |
[[ "$num" =~ ^[0-9].* ]] && num="+1${num}" | |
echo $num | |
twilio api:lookups:v1:phone-numbers:fetch --type carrier --type caller-name -o json --phone-number "${num}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment