การทำ Authentication เพื่อใช้งาน API
Last updated 2 years ago
Good to know: เพื่อเพิ่มความปลอดภัยในการเรียกใช้งาน API EX10 Chat Center จึงจำเป็นต้องมีการขอ authen ก่อนเข้าใช้งาน ซึ่ง token ที่ได้จะมาจากการที่ผุ้ใช้ทำการ ล๊อคอินสำเร็จ
ข้อมูลสำหรับล๊อคอิน
USERNAME|AD|LINE
admin@mail.com
securepassword
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" }
OK
{ "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "delegateToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }