Onlinesim will send a request to your URL
↓ GET
https:///newSmsWebhook get-v2-profile-api
Receive SMS via webhook
We've added a webhook feature for you! You can set a URL in your profile settings and as soon as we get SMS for any number that you've ordered, it will be forwarded to you.
This works for both single-service activations and long term rental!
.png)
The schema of the incoming payload is described below in the Incoming payload section.
Security
OAuth2
-
sms-scope - grants access to manage numbers for the SMS receiving service from Onlinesim
-
rent-scope - grants access to renting phone numbers from Onlinesim
Incoming payload
Required
SMS payload sent by Onlinesim to your webhook URL
Content-Type
application/jsonSchema
Bodyobject
Bodyobject
user_idstring
country_codestring
numberstring
senderstring
messagestring
time_startstring
time_leftstring
operation_idstring
webhook_typeobject
codestring
Examples
Example 1
Incoming SMS webhook payload
{
"user_id": "204355",
"country_code": "7",
"number": "+79918397701",
"sender": "OKru",
"message": "текст смс",
"time_start": "2023-04-26 12:37:55",
"time_left": "880",
"operation_id": "91763432",
"webhook_type": "receiving_sms",
"code": "612045"
}Your server response
200Your server should respond with HTTP 200 OK to acknowledge receipt
Your server should respond with HTTP 200 OK to acknowledge receipt