Skip to content

Instantly share code, notes, and snippets.

@xbalaji
Last active February 24, 2021 04:20
Show Gist options
  • Save xbalaji/f0cdaba041cae48ce62fc696f94b68c6 to your computer and use it in GitHub Desktop.
Save xbalaji/f0cdaba041cae48ce62fc696f94b68c6 to your computer and use it in GitHub Desktop.
oneliners-twilio.sh
# 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