Network Unblock API
Network Unblock is an anti-fraud feature that provides a self-service capability for users to unblock their blocked network.
When a network is blocked, the Verify API returns with an error of status 7:
{
"status": "7",
"error_text": "The network you are trying to verify has been blocked due to possible fraudulent activity",
"network": "310260"
}
The network code provided in the error can be used to unblock the network via the Network Unblock API.
Please be aware that using Network Unblock feature and unblocking the network may expose it to potential fraud attacks. Customers should exercise caution and understand the associated risks and vulnerabilities.
Account Setup
The Network Unblock API is available for use with both Verify (Legacy) and Verify. In order to use the API, you need to have the account capability: verify-allow-network-unblock, which you can request from Sales. Once you have that capability assigned, you are able to use the API to unblock your blocked network.
Making a Request
The endpoint URL for your Network Unblock request will be different depending on which version of the Verify API you are using:
- Verify (Legacy):
https://api.nexmo.com/verify/network-unblock - Verify:
https://api.nexmo.com/v2/verify/network-unblock
Your request should contain the following parameters:
{
"network": "23410",
"unblock_duration": "3600"
}
networkcontains the network code provided in the original error.unblock_durationis an optional parameter that will guarantee a network unblock for a specific time period. It ranges from 0 seconds to 86,400 seconds (24 hours).
In the example above, where unblock_duration is set to 60 minutes for network 23410, that network will be unblocked and will be guaranteed to remain so for 60 minutes (even if another block might be issued during that time). After the hour ends, the network will stay unblocked unless another block is issued by the anti-fraud system due to fraudulent activity.
If successful, you will receive a 200 response indicating how long the network will be unblocked for:
{
"network": "23410",
"unblocked_until": "2024-04-22T08:34:58Z"
}
Further information, including error responses, can be found in the API Specification.