Vonage Network Auth API
Network Auth API provides the customer the ability to authentication prior to making requests to certain Vonage Network APIs.
More information is available at https://developer.vonage.com/en/getting-started-network/authentication/
Available Operations
Query Parameters
The ID of the application you are using to authenticate.
The URI to automatically redirect back to after the authorization request completes. This value must exactly match the one entered in the Application configuration.
The type of response you want to receive. This should be set to code.
The scope of the request. This should be set to a value following the format openid dpv:<purpose>#<api-scope>.
A unique identifier for the request that allows the backend to recognize which request it is when the redirect_uri callback is received.
The phone number of the user you want to authenticate.
Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Your JSON web token. | Headers | Bearer <JWT> |
The JWT must correlate to the App that is approved for the Network APIs usage.
|
+447700900000The phone number of the user you want to authenticate.
openid dpv:FraudPreventionAndDetection#check-sim-swapThe scope of the request. This should be set to a value following this format openid dpv:<purpose>#<api-scope>.
Example Request
POST /oauth2/bc-authorize HTTP/1.1
Host: api-eu.vonage.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 84
login_hint=+447700900000&scope=openid+dpv:FraudPreventionAndDetection#check-sim-swapPOST /oauth2/bc-authorize HTTP/1.1
Host: api-eu.vonage.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 84
login_hint=+447700900000&scope=openid+dpv:FraudPreventionAndDetection#check-sim-swap0dadaeb4-7c79-4d39-b4b0-5a6cc08bf537The ID of the authentication request.
120The number of seconds until the authentication code expires.
2The number of seconds until the next request should be made.
Example Response
{
"auth_req_id": "0dadaeb4-7c79-4d39-b4b0-5a6cc08bf537",
"expires_in": "120",
"interval": "2"
}Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Your JSON web token. | Headers | Bearer <JWT> |
The JWT must correlate to the App that is approved for the Network APIs usage.
|
authorization_codeThe type of grant you are requesting. This should be set to authorization_code.
0dadaeb4-7c79-4d39-b4b0-5a6cc08bf537The authentication code you received in the /auth request.
https://example.com/callbackThe URL to Application's Redirect URI that was used in the /auth request.
Example Request»Client Authentication
POST /oauth2/token HTTP/1.1
Host: api-eu.vonage.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 113
grant_type=authorization_code&code=0dadaeb4-7c79-4d39-b4b0-5a6cc08bf537&redirect_uri=https://example.com/callbackPOST /oauth2/token HTTP/1.1
Host: api-eu.vonage.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 113
grant_type=authorization_code&code=0dadaeb4-7c79-4d39-b4b0-5a6cc08bf537&redirect_uri=https://example.com/callback