Skip to content

Commit d8dca46

Browse files
committed
feat(sub accounts): added examples (#130)
1 parent e17c278 commit d8dca46

15 files changed

+353
-722
lines changed

.env-example

+6
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ FILE_CAPTION=
7474
LOGO_IMAGE_URL=
7575
HEADER_IMAGE_URL=
7676
ABOVE_BAR_CODE_IMAGE_URL=
77+
7778
MESSAGES_SANDBOX_URL=
7879
MESSAGES_SANDBOX_WHATSAPP_NUMBER=
7980
MESSAGES_SANDBOX_ALLOW_LISTED_TO_NUMBER=
@@ -88,3 +89,8 @@ SESSION_ID=
8889
THEME_ID=
8990
THEME_DISPLAY_NAME=
9091
RECORDING_ID=
92+
93+
# Subaccounts
94+
NEW_SUBACCOUNT_NAME=
95+
NEW_SUBACCOUNT_SECRET=
96+
SUBACCOUNT_KEY=

.github/workflows/push.yml

-21
This file was deleted.

README.md

+38-21
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,63 @@
22

33
<img src="https://developer.nexmo.com/images/logos/vbc-logo.svg" height="48px"/>
44

5-
Quickstarts also available for: [Python](https://github.com/Vonage/vonage-python-code-snippets), [.NET](https://github.com/Vonage/vonage-dotnet-code-snippets), [Node.js](https://github.com/Vonage/vonage-node-code-snippets), [PHP](https://github.com/Vonage/vonage-php-code-snippets), [Ruby](https://github.com/Vonage/vonage-ruby-code-snippets) and [cURL](https://github.com/Vonage/vonage-curl-code-snippets).
6-
7-
These code samples are meant to be used for [https://developer.nexmo.com/](https://developer.nexmo.com/), and are structured in such a way as to be used for internal testing. Developers are free to use these code snippets as a reference, but these may require changes to be worked into your specific application. We recommend checking out the [Vonage API Developer Website](https://developer.nexmo.com/), which displays these code snippets in a more copy/paste fashion.
5+
Quickstarts also available for:
6+
[Python](https://github.com/Vonage/vonage-python-code-snippets),
7+
[.NET](https://github.com/Vonage/vonage-dotnet-code-snippets),
8+
[Node.js](https://github.com/Vonage/vonage-node-code-snippets),
9+
[PHP](https://github.com/Vonage/vonage-php-code-snippets),
10+
[Ruby](https://github.com/Vonage/vonage-ruby-code-snippets) and
11+
[cURL](https://github.com/Vonage/vonage-curl-code-snippets).
12+
13+
These code samples are meant to be used for
14+
[https://developer.nexmo.com/](https://developer.nexmo.com/), and are
15+
structured in such a way as to be used for internal testing. Developers are
16+
free to use these code snippets as a reference, but these may require changes
17+
to be worked into your specific application. We recommend checking out the
18+
[Vonage API Developer Website](https://developer.nexmo.com/), which displays
19+
these code snippets in a more copy/paste fashion.
820

921
## Configure with Your Vonage API Keys
1022

11-
If you'd still like to use this sample you will first need a [Vonage account](https://dashboard.nexmo.com/sign-up). Once you have your own API credentials, rename
12-
the `.env-example` file to `.env` and set the values as required.
23+
If you'd still like to use this sample you will first need a
24+
[Vonage account](https://dashboard.nexmo.com/sign-up). Once you have your own
25+
API credentials, rename the `.env-example` file to `.env` and set the values
26+
as required.
1327

14-
For some of the examples, you will need to [buy a number](https://dashboard.nexmo.com/buy-numbers).
28+
For some of the examples, you will need to
29+
[buy a number](https://dashboard.nexmo.com/buy-numbers).
1530

1631
## Tutorials & Sample Code
1732

1833
### SMS
1934

20-
| Tutorial | Code Sample |
21-
| ---------------------------------------- | ---------------------------------------- |
22-
| [How to Send SMS Messages with Node.js and Express](https://www.nexmo.com/blog/2016/10/19/how-to-send-sms-messages-with-node-js-and-express-dr/) | [send-express.js](sms/send-express.js) |
23-
| [How to Receive SMS Messages with Node.js and Express](https://www.nexmo.com/blog/2016/10/27/receive-sms-messages-node-js-express-dr/) | [receive-express.js](sms/receive-express.js) |
24-
| [How to receive an SMS Delivery Receipt from a Mobile Carrier with Node.js](https://www.nexmo.com/blog/2016/11/23/getting-a-sms-delivery-receipt-from-a-mobile-carrier-with-node-js-dr/) | [dlr-express.js](sms/dlr-express.js) |
35+
| Tutorial | Code Sample |
36+
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|
37+
| [How to Send SMS Messages with Node.js and Express](https://www.nexmo.com/blog/2016/10/19/how-to-send-sms-messages-with-node-js-and-express-dr/) | [send-express.js](sms/send-express.js) |
38+
| [How to Receive SMS Messages with Node.js and Express](https://www.nexmo.com/blog/2016/10/27/receive-sms-messages-node-js-express-dr/) | [receive-express.js](sms/receive-express.js) |
39+
| [How to receive an SMS Delivery Receipt from a Mobile Carrier with Node.js](https://www.nexmo.com/blog/2016/11/23/getting-a-sms-delivery-receipt-from-a-mobile-carrier-with-node-js-dr/) | [dlr-express.js](sms/dlr-express.js) |
2540

2641
### Voice
2742

28-
| Tutorial | Code Sample |
29-
| ---------------------------------------- | ---------------------------------------- |
30-
| [How to Make an Outbound Text-to-Speech Phone Call with Node.js](https://www.nexmo.com/blog/2017/01/12/make-outbound-text-speech-phone-call-node-js-dr/) | [make-calls.js](voice/make-call.js) |
31-
| [How to Handle Inbound Phone Calls with Node.js](https://www.nexmo.com/blog/2017/01/26/handle-inbound-text-speech-phone-call-node-js-dr/) | [receive-call-webhook.js](voice/receive-call-webhook.js) |
32-
| How to Direct Inbound Phone Calls to an Endpoint with Failover with Node.js| [receive-call-webhook-failover.js](voice/receive-call-webhook-failover.js) |
33-
| [How to Record Audio from Incoming Calls with Node.js](https://www.nexmo.com/blog/2017/02/06/how-to-record-audio-from-phone-call-node-js-dr/) | [record-call.js](voice/record-call.js) |
34-
| [How to Make a Private Phone Call with Node.js](https://www.nexmo.com/blog/2017/03/21/make-private-phone-call-node-js-dr/) | [proxy-call.js](https://github.com/nexmo-community/nexmo-node-quickstart/blob/master/voice/proxy-call.js) |
43+
| Tutorial | Code Sample |
44+
|----------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
45+
| [How to Make an Outbound Text-to-Speech Phone Call with Node.js](https://www.nexmo.com/blog/2017/01/12/make-outbound-text-speech-phone-call-node-js-dr/) | [make-calls.js](voice/make-call.js) |
46+
| [How to Handle Inbound Phone Calls with Node.js](https://www.nexmo.com/blog/2017/01/26/handle-inbound-text-speech-phone-call-node-js-dr/) | [receive-call-webhook.js](voice/receive-call-webhook.js) |
47+
| How to Direct Inbound Phone Calls to an Endpoint with Failover with Node.js | [receive-call-webhook-failover.js](voice/receive-call-webhook-failover.js) |
48+
| [How to Record Audio from Incoming Calls with Node.js](https://www.nexmo.com/blog/2017/02/06/how-to-record-audio-from-phone-call-node-js-dr/) | [record-call.js](voice/record-call.js) |
49+
| [How to Make a Private Phone Call with Node.js](https://www.nexmo.com/blog/2017/03/21/make-private-phone-call-node-js-dr/) | [proxy-call.js](https://github.com/nexmo-community/nexmo-node-quickstart/blob/master/voice/proxy-call.js) |
3550

3651
### Verify
3752

38-
| Tutorial | Code Sample |
39-
| ------------------------- | ---------------------------------------- |
53+
| Tutorial | Code Sample |
54+
|---------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
4055
| [Two-Factor Authentication](https://www.nexmo.com/blog/2017/04/11/implement-two-factor-authentication-2fa-web-apps-node-js-dr/) | [2fa.js](https://github.com/nexmo-community/nexmo-node-quickstart/blob/master/verify/2fa.js) and [UI code](https://github.com/nexmo-community/nexmo-node-quickstart/tree/master/verify/views) |
4156

4257
## Request More Examples
4358

44-
Please [raise an issue](/../../issues/) to request an example that isn't present within the quickstart. Pull requests will be gratefully received.
59+
Please [raise an issue](https://github.com/Vonage/vonage-node-sdk/issues) to
60+
request an example that isn't present within the quickstart. Pull requests
61+
will be gratefully received.
4562

4663
## Licenses
4764

0 commit comments

Comments
 (0)