Skip to content

Instantly share code, notes, and snippets.

@WendySanarwanto
Last active December 19, 2016 01:07
Show Gist options
  • Save WendySanarwanto/4269c92dd6a1f425cfdd45370b64215e to your computer and use it in GitHub Desktop.
Save WendySanarwanto/4269c92dd6a1f425cfdd45370b64215e to your computer and use it in GitHub Desktop.
Receiving Call from Shoutpoint API
Receiving Phone Call:
---------------------
By using Postman:
1. Get available Phone numbers:
Invoke: GET https://{{BASE_URL}}/PhoneNumbers/Available?is_sms=true&search_by=region&search_on=CA
Headers: X-Api-Key => ykFccAt1QpnJApkagGsLv4VkV8jbTODS
Number we pick: <Pick a number>
2. Provision selected phone number - if we have done it in prior step, skip this step:
Invoke: POST https://{{BASE_URL}}/PhoneNumbers/CallFlows
Headers: X-Api-Key => ykFccAt1QpnJApkagGsLv4VkV8jbTODS
Body: ["+1<picked number>"]
3. Configure Call Flow Callback:
By using call flow scripts in here: https://s3.amazonaws.com/com.shoutpoint.actions/docs/hello-world.json
Invoke: POST https://{{BASE_URL}}/CallFlows/Callbacks
Headers: X-Api-Key => ykFccAt1QpnJApkagGsLv4VkV8jbTODS
Body:
[{
"no": "+1<picked number>",
"callback": {
"method": "POST",
"url": "https://c64j4uda67.execute-api.us-east-1.amazonaws.com/testdev/",
"content_type": "application/json"
}
}]
[{
"no": "+1<picked number>",
"callback": {
"url": "https://s3.amazonaws.com/com.shoutpoint.actions/docs/hello-world.json",
"method": "GET"
}
}]
4. Dial the number using your phone:
If you are using 3, press 01088 first then dial 1<picked number>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment