คู่มือ aWhere
พัฒนาAPIcore-services

โปรไฟล์

ผู้ใช้ที่ลงชื่อเข้าใช้อยู่: โปรไฟล์และรหัสผ่าน

อ่านโปรไฟล์ของคุณ

GET
/api/profile

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Body ของคำตอบ

The user, without the password.

application/json
  1. response

The fields of a user: _id, username, displayName, firstName, lastName, email, role, groups and others.

curl -X GET "https://platform.example.com/api/profile" \  -H "Authorization: Bearer $TOKEN"
{}

แก้โปรไฟล์ของคุณ

PUT
/api/profile

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Body ของคำขอ

  1. body
picture?file

A file.

รูปแบบbinary
displayName?unknown
username?unknown
firstName?unknown
lastName?unknown
middleName?unknown
email?unknown

Body ของคำตอบ

The answer.

response?stringapplication/json

The id.

curl -X PUT "https://platform.example.com/api/profile" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "picture": "@file",  "displayName": "...",  "username": "..."}'
"string"

เปลี่ยนรหัสผ่านของคุณ

PUT
/api/profile/password

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Body ของคำขอ

application/json
  1. body
currentPassword*unknown
password*unknown
confirmPassword*unknown

Body ของคำตอบ

The answer, as JSON.

curl -X PUT "https://platform.example.com/api/profile/password" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "currentPassword": "...",  "password": "...",  "confirmPassword": "..."}'
ว่าง