Page cover image

Authentication

การทำ Authentication เพื่อใช้งาน API

Good to know: เพื่อเพิ่มความปลอดภัยในการเรียกใช้งาน API EX10 Chat Center จึงจำเป็นต้องมีการขอ authen ก่อนเข้าใช้งาน ซึ่ง token ที่ได้จะมาจากการที่ผุ้ใช้ทำการ ล๊อคอินสำเร็จ

ทำการล๊อกอินเข้าใช้งานในระบบ

post

ข้อมูลสำหรับล๊อคอิน

Body
typestringOptionalExample: USERNAME|AD|LINE
usernamestringOptionalExample: admin@mail.com
passwordstringOptionalExample: securepassword
Responses
200
OK
application/json
post
POST /auth/login HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 83

{
  "type": "USERNAME|AD|LINE",
  "username": "admin@mail.com",
  "password": "securepassword"
}
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "delegateToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Last updated