Code snippets are short pieces of code you can reuse in your own applications. The code snippets use code from example repositories.
Please read this information carefully, so you can best use the code snippets.
- Create a Nexmo account
- Rent a Nexmo Number
- Install the Nexmo Command Line tools
- Create a Nexmo Application using the command line tools or Dashboard
- Install the Nexmo Library for your programming language
- Set up Ngrok
The following replaceable information depends on the library and specific call:
||Private key path.|
||The Nexmo Application ID.|
All phone numbers are in E.164 format.
||Replace with your Nexmo Number. E.g. 447700900000|
||Replace with the number you are calling. E.g. 447700900001|
||Replace with number you are forwarding to. E.g. 447700900002|
UUIDs are typically used in the code snippets to identify a specific call.
||Replace with the UUID of the call to modify. For example code use:
Some code snippets have more specialised variables that will need to be replaced by actual values. These may be specified on a per-code snippet basis.
The main ones you will meet here are:
/webhooks/answer- Nexmo callback GETs from here. You supply an NCCO.
/webhooks/event- Nexmo callback POSTs to here. You receive JSON event.
/webhooks/recordings- Nexmo callback POSTs to here. You receive JSON object with recording details.
/webhooks/dtmf- Nexmo POSTs user DTMF input here in a JSON object.
If you are using Ngrok you will set your webhook URLs in the Nexmo Application object to something like:
demo in the above with whatever applies in your case.