Sending a request is fully consistent with the already existing method. Only the "destination": "otp" parameter is changed, instead of "destination": "phone".
POST (PUT) https://api.bsg.hk/rest/sms/create/
Headers:
X-API-KEY: live_xxx
Content-Type: application / json
Request:
{
"originator": "testsms",
"destination": "otp",
"body": "Your code to enter the application: {gen_otp_09,4}",
"msisdn": "380505142320",
"reference": "SendSMS11062021_18"
}
generation variations
{gen_otp_09,9} - generates a numeric code using values from 0 to 9, 9 characters long
{gen_otp_az, 9} - generate alphabetic code using values from a to z, using only lowercase, 9 characters long
{gen_otp_aZ, 9} - generate alphabetic code using values from a to z using upper and lower case, 9 characters long
{gen_otp_AZ, 9} - generate alphabetic code using values from a to z using only upper case, 9 characters long
{gen_otp_a9,9} - generate an alphanumeric code using values from a to 9 using upper and lower case, 9 characters long
{gen_otp _ **, 9} - generation of an alphanumeric-character code using special characters, including, in addition to numbers and letters of different registers, 9 characters long
The number after the decimal point specifies the exact number of characters in the verification code.
Response:
{
"result": {
"error": 0,
"errorDescription": "No errors",
"reference": "SendSMS11062021_18",
"id": "1436007377",
"price": 0.04647,
"currency": "UAH",
"otp_code": "2979"
}
}
Comments
0 comments
Article is closed for comments.