เริ่มต้นการใช้งาน

แนะนำข้อมูลเบื้องต้นเกี่ยวกับหลักการทำงานของ API ของ SMS Cyberrich ในการส่งข้อความ จัดการบัญชีต่างๆ

Base URL

Base URL: https://api.cyberrichsms.com/

เราแนะนำให้เรียกใช้งานทุก Request มาที่ Base URL ผ่าน HTTP POST, GET method

Content-Type & Accept header

API Cyberrich SMS รองรับ JSON ดังนั้นควรจะระบุ Content-Types และเงื่อนไข Accept ไว้ใน Header ทั้งนี้ถ้าไม่ได้ระบุ Content-Type คุณจะได้รับ Error code ซึ่งขึ้นอยู่กับรูปแบบ Accept ที่ถูกเลือกใน header สำหรับการ Request

Content-Type: application/json

Accept header: application/json

Authorization

ระบบรองรับ Basic Authorization ด้วย username และ password ตัวอย่าง Authorization header สร้างได้ดังนี้

 Username: myuser
 Password: mypassword

Guides

  1. Username และ password ต้องถูกรวมกันในรูปแบบ string

  2. เข้ารหัส string โดยการใช้มาตรฐาน JWT Accesstoken

Authorization header: Bearer QWxhZGRpbjpvcGVuc2VzYW1

Last updated