Introducing the Network Enablement API
最終更新日 December 12, 2024

We’re excited to announce the launch of the Network Enablement API, a solution designed to improve the authentication flow of Network APIs. 

At the time of this announcement, the Network Enablement API is only used for the Number Verification API.

How Does Network Enablement API Work?

Imagine you are a mobile application developer that uses phone numbers to authenticate your end users. 

Until now, the client authentication (or frontend authentication) flow starts with your backend application building the URL required to initiate the frontend authentication flow to call the Number Verification API.

With the introduction of Vonage’s Network Enablement API, the first step becomes much simpler: Your backend application integrates with Vonage’s Network Enablement API, directly returning the URL for Number Verification’s frontend authentication flow.

The image shows a sequence diagram to show how to use Network Enablement API to create, and return to the mobile application, the authorization URL. The rest of the diagram shows the existing flow when calling to Number Verification API.Network Enablement API and Number Verification flow

Why Network Enablement API?

The Network Enablement API provides two big benefits:

  • Smart Validation: The API pre-checks that the phone number provided is on a mobile network that supports the Number Verification API. It also confirms you are using the API for a purpose that the associated mobile network allows. This upfront validation optimizes your application.

  • Better Performance: It improves the latency of Network API requests by minimizing the number of redirects from mobile devices, where latencies can be high.

Network Enablement API Integration

The Network Enablement API uses JSON Web Tokens (JWT) for authentication and, for security reasons, must always be called from your trusted server rather than from an untrusted location like an end-user device. 

Let’s see how it works:

The backend application sends a POST request to the /network-enablement endpoint with the phone number (in E.164 format), the scopes, and a unique state identifier:

{
  "phone_number": "+341234567",
  "scopes": ["dpv:FraudPreventionAndDetection#number-verification-read"],
  "state": "12345-6789"
}

The Network Enablement API returns an authentication URL (auth_url). The frontend will use this URL to initiate the Authorization Code Flow.

{
    "scopes": {
        "dpv:FraudPreventionAndDetection#number-verification-verify-read": {
            "app_url": "https://api-eu.vonage.com/oauth2/auth?client_id=sandbox_test&scope=dpv%3AFraudPreventionAndDetection%23number-verification-verify-read&state=v2_840e17a8-79f2-1a277bff&redirect_uri=https%3A%2F%2Fui.idp.vonage.com%2Fcamara%2Foauth%2Fcallback&response_type=code",
            "auth_url": "https://api-eu.vonage.com/oauth2/auth?client_id=sandbox_test&scope=dpv%3AFraudPreventionAndDetection%23number-verification-verify-read&state=v2_840e17a8-79f2-1a277bff&redirect_uri=https%3A%2F%2Fui.idp.vonage.com%2Fcamara%2Foauth%2Fcallback&response_type=code",
            "requires_carrier_network": false
        }
    }
}

Get Started with the Network Enablement API 

  1. Check out our OpenAPI specification.

  2. Learn how the API works by reading the documentation

  3. Explore a demo implementation in this GitHub repository.

Get in Touch

Do you have questions or concerns? We are here to help! Join us on the Vonage Developer Community Slack or message us on X, and we will respond to you. 

Happy hacking!

Alvaro NavarroSenior Developer Advocate

Alvaro is a developer advocate at Vonage, focusing on Network APIs. Passionate about Developer Experience, APIs, and Open Source. Outside work, you can often find him exploring comic shops, attending sci-fi and horror festivals or crafting stuff with those renowned tiny plastic building blocks.

Ready to start building?

Experience seamless connectivity, real-time messaging, and crystal-clear voice and video calls-all at your fingertips.

Subscribe to Our Developer Newsletter

Subscribe to our monthly newsletter to receive our latest updates on tutorials, releases, and events. No spam.