- Node.js (version 18.x or higher recommended)
- npm (comes with Node.js)
- (Optional) Git for cloning the repository
- Copy the example environment file (if provided) or create a new
.envfile in the project root. - Add the required environment variables. Example:
BACKEND_URL=http://localhost:3000
API_GATEWAY=https://api.nexmo.com
API_GATEWAY_OAUTH=https://api-eu-3.vonage.com
API_GATEWAY_NETWORK_APIS=https://api-eu.vonage.com
API_KEY=<yours from the Vonage API Dashboard>
API_SECRET=<yours from the Vonage API Dashboard>
API_JWT=<your JWT token>
NV_SCOPE="dpv:FraudPreventionAndDetection#number-verification-verify-read"
- You can generate a pair of public and private keys for your application on the Vonage dashboard, and then use Vonage's JWT Generator to create a JWT token.
- The Number Verification API requires the
dpv:FraudPreventionAndDetection#number-verification-verify-readscope to be set in theVITE_NV_SCOPEvariable, following the CAMARA standard scope.
- Save the
.envfile.
-
Install dependencies:
npm install -
Start the server in development mode (with automatic restarts on file changes):
npm run dev -
The Express server should now be running at
http://localhost:<PORT>(default port is 3000 unless overridden in.envas PORT of BACKEND_URL if this matches the format :).
This project is licensed under the Apache License - see the LICENSE file for details.
Check the workshop's full project, abstract and other repos at Workshop: "Integrating Open Gateway in your application to shift to a better sign-up experience".