Last active
August 6, 2019 13:38
-
-
Save stefanjudis/c0c45b57a5222143622057bb74ec5682 to your computer and use it in GitHub Desktop.
Twilio CLI snippets
This file contains 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
# Buy a local number | |
TWILIO_NUMBER=$(twilio api:core:available-phone-numbers:local:list --country-code US -o json | jq -r '.[0] | .phoneNumber') | |
twilio api:core:incoming-phone-numbers:local:create --phone-number="$TWILIO_NUMBER" -o json | jq -r '.[0] | .friendlyName' > /dev/null | |
echo "Bought number..." | |
echo $TWILIO_NUMBER | |
# Buy a mobile number | |
TWILIO_NUMBER=$(twilio api:core:available-phone-numbers:mobile:list --country-code DE -o json | jq -r '.[0] | .phoneNumber') | |
twilio api:core:incoming-phone-numbers:mobile:create --phone-number="$TWILIO_NUMBER" -o json | jq -r '.[0] | .friendlyName' > /dev/null | |
echo "Bought number..." | |
echo $TWILIO_NUMBER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment