This is webhook for sending messages on server OnlineSim.
axios.post(
'https://onlinesim.ru/api/push_sms_webhook',
{action: "PUSH_SMS",phoneFrom: 'vk', smsId: 355, phone: 79281234567, text: "VK: 33708", status: 2, key: "APIKEY", service: "RENT"},
{headers: {'Content-Type': 'application/json; charset=utf-8'}}
)
Parameter name | Parameter | Data type | Description |
---|---|---|---|
smsId | required | INT | Operation ID |
phoneFrom | required | STRING | Service name or number |
phone | required | INT | Phone number |
text | required | STRING | Message text |
action | required | STRING | PUSH_SMS |
key | required | STRING | API key |
service | required | STRING | RENT |
Response:
{
"status": "SUCCESS"
}
If you get a response with SUCCESS status, SMS should be marked in database as succesfuly delivered (don't send again). If response status is different from SUCCESS, then in 10 seconds another SMS will be sent.