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
/network-enablement endpoint in JSON format with the following body parameters:Body Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
phone_number | Yes | string | The phone number of the user in E.164 format, including the country code. |
scope | Yes | Array of string | A list of permission scopes that define the specific access or operations being requested for the API call. See the scopes guide. |
state | Yes | string | A generated value used to maintain state between the request and callback. Must be unique for each request. |
Headers
| Header | Description |
|---|---|
Authorization | Must 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-Type | Must 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_urlcontains the URL to be called on the end-user device to start the authentication flow.- The
requires_carrier_networkparameter specifies whether theauth_urlmust be sent from the client using a carrier network instead of WiFi.