Network Enablement

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:

Baixar a especificação OpenAPI

NetworkEnablement

facilitates the integration of the Network APIs.

Operações disponíveis

Handle network enablement requests

Initiates the usage of Network APIs

posthttps://api-eu.vonage.com/v0.1/network-enablement

Autenticação

ChaveDescriçãoOndeExemplo
Authorization

Seu token JSON da Web.
Saiba mais sobre os JWTs

Headers

Bearer <JWT>

Corpo da solicitação
Tipo de conteúdo
application/json

phone_number
string
Obrigatório
exemplo+442072068888

The phone number that will be used to authenticate the user.

scopes
array
Obrigatório

List of scopes used during the authentication process to define the specific actions a user is allowed to access.

state
string
Obrigatório
exemplotests-state-b3977c55-b4caa

A random string to identify each access token you generate.

Exemplo Solicitação

{
   "phone_number": "+442072068888",
   "scopes": [
      "dpv:FraudPreventionAndDetection#number-verification-verify-read"
   ],
   "state": "tests-state-b3977c55-b4caa"
}
{
   "phone_number": "+442072068888",
   "scopes": [
      "dpv:FraudPreventionAndDetection#number-verification-verify-read"
   ],
   "state": "tests-state-b3977c55-b4caa"
}

Respostas
Tipo de conteúdo
application/json

ok

scopes
object

Requested scope responses

dpv:FraudPreventionAndDetection#number-verification-verify-read
Um dos
app_url
string

[deprecated] If present, will always be null.

auth_url
string

Contains the URL to be sent to the frontend to start the authorization flow

requires_carrier_network
boolean

[deprecated] Indicates that the call to auth_url must be made over the carrier network, rather than via Wifi. If present, always true.

Exemplo Resposta

{
   "scopes": {
      "dpv:FraudPreventionAndDetection#number-verification-verify-read": {
         "app_url": null,
         "auth_url": "https://api-eu.vonage.com/oauth2/auth",
         "requires_carrier_network": true
      },
      "dpv:FrandPreventionAndDetection#example-error-scope": {
         "error": {
            "title": "Forbidden",
            "instance": "bf0ca0-bf927b-3b52e3cb-03217e1a1ddf",
            "detail": "The Network API application can only be used with verified phone numbers. Blocked by allowlist.",
            "error_type": "UNAUTHORIZED"
         }
      }
   }
}