URL
https://onlinesim.io/api/setOperationOk.php?apikey=APIKEY&tzid=1234
It sends the notification of successful reception of the code and completes the operation
Example
- javascript
var settings = {
"async": true,
"crossDomain": true,
"url": "https://onlinesim.io/api/setOperationOk.php?apikey=APIKEY&tzid=1234",
"method": "GET",
"headers": {"accept": "application/json"}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
- php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://onlinesim.io/api/setOperationOk.php?apikey=APIKEY&tzid=1234",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
]
));
$response = curl_exec($curl);
curl_close($curl);
var_dump(json_decode($response, true));
Name of parameter | Parameter | Type of data | Description |
---|---|---|---|
tzid | required | INT | operation identifier |
ban | non-required | INT | Only for Chinese numbers, It can be used in case if you were not issued a number or did not receive the SMS within 5 minutes. Send 1 to block the number |
After the successful completion, you will get a response in the JSON format, in the following form:
json {response:RESPONSE, tzid:TZID}
Result | Description |
---|---|
response | 1, if the request has been completed successfully, or an error message; |
tzid | operation ID |
Result | Description |
---|---|
ERROR_WRONG_TZID | wrong operation number. |
NO_COMPLETE_TZID | unable to complete the operation. |
/demo/api/setOperationOk.php?apikey=APIKEY&tzid=1234
The method will return generated test data. To test errors, forward the required error as the err parameter. For example, err=ERROR_WRONG_TZID