OTP (One Time Password)

RequestOTP

POST https://bulk.smsyouto.com/api/otp/request

ใช้สำหรับการขอชุดรหัสผ่าน เพื่อทำธุรกรรมทางอิเล็กทรอนิกส์ไปยัง SMS โทรศัพท์มือถือคุณ เพื่อใช้ตรวจสอบและยืนยันการเป็นเจ้าของบัญชี

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

phonenumber

string

เบอร์โทรศัพท์มือถือ

sender

string

ชื่อผู้ส่ง

pinlength

number

ความยาวของ OTP

expire

number

เวลาหมดอายุ สูงสุด 600 วินาที

ref

boolean | true | false

ตัวอย่าง Ref Code: psRs2 รหัสยืนยัน ..................

content

string

ข้อความสำหรับแจ้งไปยังเบอร์โทรศัพท์มือถือ ตัวอย่าง

*กำหนดรูปแบบ {pin_code}

รหัส OTP คือ {pin_code}

Response

{
    "status": 200,
    "message": "OTP sent successfully",
    "data": {
        "otpid": "7ddc7f43-9dfe-4bba-874f-290337f82647",
        "phonenumber": "0999999999",
        "refCode": "psRs2"
    }
}

ResendOTP

POST https://bulk.smsyouto.com/api/otp/resend

ใช้สำหรับส่งชุดรหัสผ่าน เพื่อทำธุรกรรมทางอิเล็กทรอนิกส์ไปยัง SMS โทรศัพท์มือถือคุณ เพื่อใช้ตรวจสอบและยืนยันการเป็นเจ้าของบัญชี อีกครั้ง

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

otpid

string

เป็นรหัสการส่งข้อความ OTP

Response

{
    "status": 200,
    "message": "OTP sent successfully",
    "data": {
        "otpid": "ff7e4459-d7ab-498d-8040-3502431dc245",
        "phonenumber": "0999999999",
        "refCode": "dsaw2"
    }
}

VerifyOTP

POST https://bulk.smsyouto.com/api/otp/verify

<Description of the endpoint>

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

otpid

string

เป็นรหัสการส่งข้อความ OTP

otpcode

string

รหัส OTP

Response

{
    "otpid": "7ddc7f43-9dfe-4bba-874f-290337f82647",
    "result": true,
    "isErrorCount": false,
    "isExprCode": false
}

Get Infomation OTP

GET https://bulk.smsyouto.com/api/otp/info/:otpid

<Description of the endpoint>

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Parameter

Name
Type
Description

otpid

string

เป็นรหัสการส่งข้อความ OTP

Response

{
    "status": 200,
    "data": {
        "otpid": "7ddc7f43-9dfe-4bba-874f-290337f82647",
        "phonenumber": "099999999",
        "infomation": "Successfully sent to phone"
    }
}

Last updated