Network Enablement API

The Network Enablement API improves the existing authentication flow for Network APIs. This is especially beneficial for those APIs using client authentication, such as the Number Verification API, increasing performance, privacy and security:

  • Facilitates pre-checks and provides developers with the necessary data to optimize their calls to the Network APIs.
  • Reduces the latency of API calls by improving the routing of the operators calls.

API Reference

The OpenAPI specification for the Network Enablement API is available here.

Authentication

The Network Enablement API uses JSON Web Tokens (JWT) for authentication. Check out our detailed guide on generating a JWT.

How to Use the API

For security reasons it is essential that the Network Enablement API is called by your backend and not from an end-user device.

Request

To invoke the API, send a

POST
request to the /network-enablement endpoint in JSON format with the following body parameters:

Body Parameters

ParameterRequiredTypeDescription
phone_numberYesstringThe phone number of the user in E.164 format, including the country code.
scopeYesArray of stringA list of permission scopes that define the specific access or operations being requested for the API call. See the scopes guide.
stateYesstringA generated value used to maintain state between the request and callback. Must be unique for each request.

Headers

HeaderDescription
AuthorizationMust be set to Bearer along with the JWT token generated in the previous step. The JWT must correlate to the App that is approved for the Network APIs usage.
Content-TypeMust be set to application/json.

The following example uses cURL to call the Network Enablement API, using the Virtual Operator

Response

If the request is successful, the response will return a scope object similar to this:

Where:

  • auth_url contains the URL to be called on the end-user device to start the authentication flow.
  • The requires_carrier_network parameter specifies whether the auth_url must be sent from the client using a carrier network instead of WiFi.