Join us in San Francisco on the 29/30th of October for two days of developer workshops and technical talks

Create your Nexmo Messages and Dispatch Application

If you have not yet done so, create a new directory for your project, such as my-project. Change into this directory.

Use the CLI to create your Nexmo application:

nexmo app:create "My App" --keyfile=private.key --type=messages

Make a note of the generated Application ID. You can also check this in the Nexmo Dashboard.

This command will also create a private key, private.key in your current directory.

This command also sets the two webhooks that need to be set: the inbound message and message status webhooks. Nexmo will callback on these webhooks with useful information. All interaction between your App and Nexmo takes place through these webhooks. You must at least acknowledge each of these webhooks in your app with a status 200 response.

Sending a Facebook message with failover

The Dispatch API provides the ability to create message workflows with failover to secondary channels. This task looks at using the Dispatch API to send a Facebook message with failover to the SMS channel.