send_sms
To send an SMS, use the user/send_sms method.
svc=user/send_sms¶ms={
"phoneNumber": <text>,
"smsText": <text>
}
To send a request, the current user must have the Can send SMS flag (0x20). See update_user_flags.
Parameters
The required parameters are marked with an asterisk (*).
| Name | Description |
|---|---|
| phoneNumber* | Phone number. |
| smsText* | Message text. |
Response
If the request is completed successfully, a response of the following format is returned:
{
"hash": <text> /* SMS GUID. Returned only if the phone number belongs to a driver and you have the View drivers and driver groups access right to the resource of this driver. Otherwise, an empty object is returned. */
}
If the request fails, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 4 | Wrong input parameters: a parameter is missing or empty, or the phone number is incorrect. |
| 6 | Failed to send the SMS, or the user doesn’t have the Can send SMS flag. |