https://{ourserver.com}/v1/PUSH_SMSWebhook POST /v1/PUSH_SMS
Send SMS to Onlinesim
This is a webhook for sending messages to Onlinesim server. These requests should be sent automatically when your number with active operation has received a message to forward it to Onlinesim server.
If you get a response with 200(OK) status, SMS can be marked in your database as successfully delivered (don't send message again).
If response is different from 200, then in 10 seconds another request
with the same context should be sent, unless it's NO_OPERATION or
BAD_SERVICE error.
Following responses with errors are possible:
NO_OPERATION/NO_OP- this error occurs when you try to push SMS for a number that has no active operation;BAD_SERVICE- this error occurs when you try to push SMS from a service that is banned by our server (banks, payment systems, etc.);IGNORED- this error occurs when you try to push SMS from a service that is differs from the one the client has ordered (only appears when filtration is done on our side);SERVICE_BAN- this error occurs when you try to push SMS from the service you've blacklisted (you can add services to the blacklist, it prevents users to order your numbers for these services)
Parameters
header2
| Name | Type | Description |
|---|---|---|
Authorization* | string | see more here |
Content-Type* | string |
Enum: application/json; charset=utf-8 |
Request Body
PUSH_SMS webhook: your server must send this request once an event is triggered (when the ordered number has received a message).
application/jsonBodyobject
Examples
{
"smsId": 124971,
"phoneFrom": "vk",
"phone": "79104041216",
"text": "Your OTP 46875",
"action": "PUSH_SMS",
"key": "apikey"
}Responses
200Onlinesim server response
Onlinesim server response
application/jsonResponseobject
Examples
{
"status": "SUCCESS"
}NO_OPBAD_SERVICEIGNOREDSERVICE_BANTOO_MANY_ATTEMPTS404NO_OPERATION / NO_OP
This error occurs when you try to push SMS for a number that has no
active operation
NO_OPERATION / NO_OP
This error occurs when you try to push SMS for a number that has no active operation