Skip to content

Commit 23c6717

Browse files
committed
vonage brand updates, heroku deploy
1 parent d8cdcde commit 23c6717

5 files changed

Lines changed: 1054 additions & 35 deletions

File tree

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
NEXMO_API_KEY=
2-
NEXMO_API_SECRET=
1+
VONAGE_API_KEY=
2+
VONAGE_API_SECRET=
33
FROM_NUMBER=
44
TO_NUMBER=

README.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# Nexmo Node.js Skeleton Application
1+
# Vonage Node.js Skeleton Application
2+
3+
<img src="https://developer.nexmo.com/assets/images/Vonage_Nexmo.svg" height="48px" alt="Nexmo is now known as Vonage" />
4+
5+
This repository is an Express application to test and debug your Vonage credentials and environment. Utilize this application to test that your API credentials are in working order. And to examine the event webhook data you receive when Vonage receives API requests from your account.
6+
7+
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
28

3-
This repository is an Express application to test and debug your Nexmo credentials and environment. Utilize this application to test that your API credentials are in working order. And to examine the event webhook data you receive when Nexmo receives API requests from your account.
49

510
* [Requirements](#requirements)
611
* [Installation and Usage](#installation-and-usage)
@@ -17,9 +22,9 @@ This application requires that you have the following installed locally:
1722
* [Node.js](https://nodejs.org/en/)
1823
* [Express](https://expressjs.com/)
1924
* [body-parser](https://github.com/expressjs/body-parser)
20-
* [Nexmo Node.js SDK](https://www.npmjs.com/package/nexmo)
25+
* [Vonage Node.js SDK](https://www.npmjs.com/package/@vonage/server-sdk)
2126

22-
Additionally, to test your Nexmo account, you must have a Nexmo account. You can create a Nexmo account for free or manage your Nexmo account details at the [Nexmo Dashboard](https://dashboard.nexmo.com).
27+
Additionally, to test your Vonage account, you must have a Vonage account. You can create a Vonage account for free or manage your Vonage account details at the [Vonage Dashboard](https://dashboard.nexmo.com).
2328

2429
## Installation and Usage
2530

@@ -31,30 +36,30 @@ git clone git@github.com:Nexmo/node-skeleton-app.git
3136

3237
Alternatively, you could also first fork your copy of this repository to your GitHub profile and then clone your forked copy.
3338

34-
Once you have downloaded a local copy, change into the directory of the application in your terminal. You can now set up the application for your Nexmo account.
39+
Once you have downloaded a local copy, change into the directory of the application in your terminal. You can now set up the application for your Vonage account.
3540

3641
### API Credentials
3742

3843
To test your API credentials, rename the provided `.env.example` file to `.env` and supply the values for the following environment variable keys:
3944

40-
* NEXMO_API_KEY=
41-
* NEXMO_API_SECRET=
45+
* VONAGE_API_KEY=
46+
* VONAGE_API_SECRET=
4247
* FROM_NUMBER=
4348
* TO_NUMBER=
4449

45-
The `NEXMO_API_KEY` and `NEXMO_API_SECRET` are to be provided with your API key and secret, respectively. The `FROM_NUMBER` is the number you wish the test SMS message to originate from. For example, this could be your [Nexmo provisioned virtual phone number](https://developer.nexmo.com/numbers/overview). The `TO_NUMBER` is the number you wish to send the test SMS message to. This could be your cell phone number.
50+
The `VONAGE_API_KEY` and `VONAGE_API_SECRET` are to be provided with your API key and secret, respectively. The `FROM_NUMBER` is the number you wish the test SMS message to originate from. For example, this could be your [Vonage provisioned virtual phone number](https://developer.nexmo.com/numbers/overview). The `TO_NUMBER` is the number you wish to send the test SMS message to. This could be your cell phone number.
4651

4752
As always, make sure not to commit your sensitive API credential data to any public version control. If you are using Git, you can add the `.env` file to your `.gitignore` file to ensure that it is not committed.
4853

4954
### Using ngrok
5055

51-
To test the incoming webhook data from Nexmo, the Nexmo API needs an externally accessible URL to send that data to. Commonly used service for development and testing is ngrok. The service provides you with an externally available web address that creates a secure tunnel to your local environment. The [Nexmo Developer Platform](https://developer.nexmo.com/concepts/guides/testing-with-ngrok) has a guide to getting started with testing with ngrok.
56+
To test the incoming webhook data from Vonage, the Vonage API needs an externally accessible URL to send that data to. Commonly used service for development and testing is ngrok. The service provides you with an externally available web address that creates a secure tunnel to your local environment. The [Vonage Developer Platform](https://developer.nexmo.com/concepts/guides/testing-with-ngrok) has a guide to getting started with testing with ngrok.
5257

53-
Once you have your ngrok URL, you can enter your [Nexmo Dashboard](https://dashboard.nexmo.com) and supply it as the `EVENT URL` for any Nexmo service that sends event data via a webhook. A good test case is creating a Voice application and providing the ngrok URL in the following format as the event URL:
58+
Once you have your ngrok URL, you can enter your [Vonage Dashboard](https://dashboard.nexmo.com) and supply it as the `EVENT URL` for any Vonage service that sends event data via a webhook. A good test case is creating a Voice application and providing the ngrok URL in the following format as the event URL:
5459

5560
`#{ngrok URL}/webhooks/event`
5661

57-
You can then call your Nexmo Voice application. With your skeleton application running, you can observe the webhook data being received in real-time for the diagnosis of any issues and testing of your Nexmo account.
62+
You can then call your Vonage Voice application. With your skeleton application running, you can observe the webhook data being received in real-time for the diagnosis of any issues and testing of your Vonage account.
5863

5964
### Running the Application
6065

@@ -64,9 +69,9 @@ Once you have your API credentials incorporated and your ngrok setup ready, you
6469
npm start
6570
```
6671

67-
You can test that your credentials work by sending a test SMS by navigating to `https://localhost:3000/test-sms` in your browser or by sending a cURL GET request to that URL. If you configured your `TO_NUMBER` to be your number, you should receive a text message shortly after that says: "This is a test SMS of my Nexmo Node.js skeleton app.".
72+
You can test that your credentials work by sending a test SMS by navigating to `https://localhost:3000/test-sms` in your browser or by sending a cURL GET request to that URL. If you configured your `TO_NUMBER` to be your number, you should receive a text message shortly after that says: "This is a test SMS of my Vonage Node.js skeleton app.".
6873

69-
The skeleton app is also capable of receiving Nexmo API webhook data. As mentioned in the [Using ngrok](#using-ngrok) section above, a good candidate for that test is a Nexmo Voice application. From within your Nexmo dashboard you can create a Nexmo Voice application, provision a Nexmo virtual phone number and then link that number to your Voice application. Once you have ensured that your new Voice application's `EVENT URL` is `#{ngrok URL}/webhooks/event`, you can then give your Nexmo number a phone call. You should see the webhook data in your console in real time. For example, data for a ringing phone call will look like this:
74+
The skeleton app is also capable of receiving Vonage API webhook data. As mentioned in the [Using ngrok](#using-ngrok) section above, a good candidate for that test is a Vonage Voice application. From within your Vonage dashboard you can create a Vonage Voice application, provision a Vonage virtual phone number and then link that number to your Voice application. Once you have ensured that your new Voice application's `EVENT URL` is `#{ngrok URL}/webhooks/event`, you can then give your Vonage number a phone call. You should see the webhook data in your console in real time. For example, data for a ringing phone call will look like this:
7075

7176
```
7277
{

app.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "Vonage Node Skeleton App",
3+
"description": "Sample Node.js Application to test Vonage environment setup",
4+
"repository": "https://github.com/Nexmo/node-skeleton-app",
5+
"keywords": [
6+
"express",
7+
"node",
8+
"heroku",
9+
"vonage"
10+
],
11+
"image": "heroku/node",
12+
"env": {
13+
"VONAGE_API_KEY": {
14+
"description": "Find your account API key and secret on the dashboard https://dashboard.nexmo.com"
15+
},
16+
"VONAGE_API_SECRET": {
17+
"description": "Find your account API key and secret on the dashboard https://dashboard.nexmo.com"
18+
},
19+
"FROM_NUMBER": {
20+
"description": "Phone number to send message from."
21+
},
22+
"TO_NUMBER": {
23+
"description": "Phone number to send message to."
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)