aWhere Manual
DevelopAPIcore-services

Profile

The signed-in user: their profile and password.

Read your profile

GET
/api/profile

Authorization

headerAuthorizationBearer <token>

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

Response 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"
{}

Change your profile

PUT
/api/profile

Authorization

headerAuthorizationBearer <token>

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

Request Body

  1. body
picture?file

A file.

Formatbinary
displayName?unknown
username?unknown
firstName?unknown
lastName?unknown
middleName?unknown
email?unknown

Response 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"

Change your password

PUT
/api/profile/password

Authorization

headerAuthorizationBearer <token>

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

Request Body

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

Response 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": "..."}'
Empty