Sending SMS Verification Details
Description
This web service is used to set and send SMS verification details.
A unique ID is sent to the user if the request is successful , otherwise it is set to null.
Definition
GET https://<domain>/services/apexrest/peer/v1/sms/sendSms
Parameters
The table given below provides details of the request parameters used by this web service:
Fields | Type | Description |
---|---|---|
accountId* | String | This is the ID of the user account |
sms_Code* | String | This is the unique SMS code given to the user |
phone | String |
|
type | String |
|
Error messages
When you post a web service, you can receive the possible error messages as shown in the table below:
Error Code | Reason | HTTP Status Code |
---|---|---|
Sms Verification Disabled | You will receive this error if the SMS verification is disabled and the coverage is not present | 400 |
No phone with your account | You will receive this error if the requested phone number is not found in the records | 400 |
ACCOUNT_NOT_FOUND | You will receive this error if the account is not found in the records | 400 |
Maximum SMS limit reached | You will receive this error if you have reached the maximum SMS limit on a given day | 401 |
Sms send failed.Please try again | You will receive this error if the message that you are trying to send has failed | 401 |
NO_PARAMS_SMS | You will receive this error if the SMS token, SMS unique ID required to send an SMS are not present. | 401 |
INCORRECT_SMS | You will receive this error if the incorrect SMS token is entered | 401 |
MAX_RETRY_SMS | You will receive this error if you reach the maximum limit to enter the SMS token | 401 |
INCORRECT_SMS | You will receive this error if you enter the incorrect SMS token | 401 |
TIMEOUT_SMS | You will receive this error if the SMS token is entered after a certain period of time. ie., after the time-out of the SMS token. | 401 |
HTTP_INTERNAL_ERRROR | You will receive this error if there is any run time exception | 500 |
Sample Request
The sample request to be sent is as shown below:
https://na11.salesforce.com/services/apexrest/peer/v1/sms/sendSms?accountId=001G000001Phdoe&sms_Code=5555
Sample Response
The sample response that you will receive is as shown below:
{ "status":"SUCCESS", "response":[ { "smsUniqueId":"a3ZG00000009z2FMAQ" } ], "errorCode":"NO_ERROR", "content":[ ] }