ดูโปรไฟล์สมาชิก
ใช้งานได้GET
/api/v1/profileดึงโปรไฟล์ของสมาชิกที่ล็อกอินอยู่ — ข้อมูลติดต่อ ระดับสมาชิก บัญชีธนาคารที่ผูกไว้ และสถานะ impersonation
impersonated_by ไม่เป็น null = session อ่านอย่างเดียว (แอดมินเข้าดูแทน) — แสดงแบนเนอร์เตือน ส่วนการแก้ไข/ทำธุรกรรมจะถูกปฏิเสธด้วย code 1002
Headers
| ฟิลด์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| Authorization | string | ใช่ | ใช้ — แนบ Bearer <access_token> ของสมาชิก |
| X-Api-Key | string | ใช่ | API key ของ agent (ak_…) จากหน้า bo |
| X-Timestamp | string | ใช่ | เวลา sign เป็น unix milliseconds (คลาดเคลื่อนได้ ±300 วินาที) |
| X-Nonce | string | ใช่ | ค่าไม่ซ้ำต่อ request (UUIDv4) กัน replay |
| X-Signature | string | ใช่ | hex(HMAC-SHA256(secret, canonical)) — ดูหน้า Authentication |
| X-Player-IP | string | — | IP จริงของผู้เล่น (IPv4/IPv6) — แนะนำให้ส่ง (ใช้ใน login history) |
| X-Player-UA | string | — | User-Agent ของผู้เล่น (optional — ลง login history) |
| X-Request-Id | string | — | correlation id ของฝั่งคุณ — ระบบ echo กลับใน request_uuid (แนะนำให้ส่ง) |
| x-lang | string | — | th (default) หรือ en — ภาษาของ message |
Response
ฟิลด์ใน data
| ฟิลด์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
| id | string | — | id สมาชิก (uuid) |
| username | string | — | username (prefix ของ agent + เบอร์โทร) |
| phone | string | null | — | เบอร์มือถือ |
| full_name | string | null | — | ชื่อ-นามสกุล |
| string | null | — | อีเมล | |
| line_id | string | null | — | LINE ID |
| avatar_url | string | null | — | URL รูปโปรไฟล์ |
| member_tier | string | null | — | ระดับสมาชิก (เริ่มที่ NEW เลื่อนขั้นตามกิจกรรม)NEW | BRONZE | SILVER | GOLD | VIP |
| status | string | — | สถานะบัญชีACTIVE | LOCKED | BANNED | PENDING_VERIFICATION |
| selected_promotion_id | string | null | — | โปรฝากเงินที่สมาชิกเลือกไว้ (null = ไม่รับโบนัส) |
| agent_id | string | null | — | id ของ agent ต้นสังกัด |
| created_at | string (ISO 8601) | — | วันเวลาสมัคร |
| last_login_at | string (ISO 8601) | null | — | เข้าสู่ระบบล่าสุด |
| impersonated_by | string | null | — | id ของแอดมิน/agent ที่กำลังเข้าดูบัญชีแทน (โหมดอ่านอย่างเดียว) — null เมื่อสมาชิกล็อกอินเอง |
| bank | object | null | — | ข้อมูลธนาคาร |
| └ bank_code | string | — | รหัสธนาคาร เช่น KBANK |
| └ bank_name | string | — | ชื่อธนาคารภาษาไทย |
| └ account_number | string | — | เลขบัญชี |
| └ account_name | string | — | ชื่อบัญชี |
ตัวอย่าง response
{
"success": true,
"code": 0,
"message": "สำเร็จ",
"data": {
"id": "0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0",
"username": "abc0812345678",
"phone": "0812345678",
"full_name": "สมชาย ใจดี",
"email": "somchai@example.com",
"line_id": "somchai_jd",
"avatar_url": null,
"member_tier": "BRONZE",
"status": "ACTIVE",
"selected_promotion_id": null,
"agent_id": "7a6b5c4d-3e2f-4a19-b7c6-d5e4f3a2b1c0",
"created_at": "2026-06-01T04:12:33.000Z",
"last_login_at": "2026-07-05T02:41:07.000Z",
"impersonated_by": null,
"bank": {
"bank_code": "KBANK",
"bank_name": "ธนาคารกสิกรไทย",
"account_number": "1234567890",
"account_name": "สมชาย ใจดี"
}
},
"request_uuid": "d17b3f82-5c40-4a96-b1e8-6f9d2c5a8e04"
}Error codes ที่พบได้
| code | ชื่อ | HTTP | ข้อความ |
|---|---|---|---|
| 1001 | UNAUTHORIZED | 401 | ไม่ได้รับอนุญาตไม่ได้แนบ Authorization: Bearer |
| 1007 | TOKEN_INVALID | 401 | โทเค็นไม่ถูกต้องaccess token ไม่ถูกต้อง/หมดอายุ หรือ session ถูกเพิกถอนแล้ว (logout) |
| 1003 | USER_NOT_FOUND | 404 | ไม่พบผู้ใช้ |