Skip to content

Instantly share code, notes, and snippets.

@lornajane
Created August 21, 2018 13:39
Show Gist options
  • Save lornajane/75c06cf4e3bbb08d94849b8d036b7073 to your computer and use it in GitHub Desktop.
Save lornajane/75c06cf4e3bbb08d94849b8d036b7073 to your computer and use it in GitHub Desktop.
UUID=$(curl -s -X POST https://api.nexmo.com/v1/calls \
-H "Authorization: Bearer "$JWT\
-H "Content-Type: application/json"\
-d '{"to":[{"type": "phone","number": "'$TO_NUMBER'"}],
"from": {"type": "phone","number": "'$NEXMO_NUMBER'"},
"answer_url":["https://developer.nexmo.com/ncco/tts.json"]}' \
| awk -F "[,:]" '/uuid/{print substr($2,2,length($2)-2)}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment