Create a Vonage Messages Application

In this topic you learn how to create a Vonage API application.

Use the CLI to create a Messages application with the webhooks that will be responsible for receiving a message to your Vonage number (/webhooks/messages/inbound), and check status updates (/webhooks/mesages/status), respectively.

These webhooks need to be accessible by Vonage's servers, so in this guide you will use ngrok to expose your local development environment to the public Internet. This article explains how to install and run ngrok and configure Vonage to send requests.

If you do not have an application, you can create one using the CLI

vonage apps create 'Your application'

✅ Creating Application
Saving private key ... Done!
Application created

Name: Your application
Application ID: 00000000-0000-0000-0000-000000000000
Improve AI: Off
Private/Public Key: Set

Capabilities:
  None Enabled

The command returns an application ID (which you should make a note of) and your private key information (which you can safely ignore for the purposes of this guide).

Run ngrok using the following command:

ngrok http 3000

Make a note of the temporary host name that ngrok provides and use it in place of example.com in the following command:

vonage apps capabilities update 00000000-0000-0000-0000-000000000000 messages `
  --messages-inbound-url='https://example.com/webhooks/messages/inbound' `
  --messages-status-url='https://example.com/webhooks/messages/status' `
  --messages-version='v1' \
  --messages-authenticate-media                                                                                                                                                                                 [boolean]
  
✅ Fetching Application
✅ Adding messages capability to application 00000000-0000-0000-0000-000000000000

Name: Your application
Application ID: 00000000-0000-0000-0000-000000000000
Improve AI: Off
Private/Public Key: Set

Capabilities:
 MESSAGES:
    Authenticate Inbound Media: On
    Webhook Version: v1
    Status URL: [POST] https://manchuck.com/meetings/status
    Inbound URL: [POST] https://manchuck.com/meetings/inbound