> For the complete documentation index, see [llms.txt](https://docs.cyberrichsms.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cyberrichsms.com/undefined.md).

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

<figure><img src="/files/QupXkx4tUDteJ8JCN8Os" alt=""><figcaption></figcaption></figure>

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

### Base URL

```uri
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

&#x20;       Content-Type:  `application/json`

&#x20;       Accept header: `application/json`

### Authorization

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

```json
 Username: myuser
 Password: mypassword
```

**Guides**

1. Username และ password ต้องถูกรวมกันในรูปแบบ string
2. เข้ารหัส string โดยการใช้มาตรฐาน JWT Accesstoken

Authorization header: **`Bearer`**` ``QWxhZGRpbjpvcGVuc2VzYW1`
