User

Authentication

  • HTTP Authentication, scheme: bearer

User

Get user info

Code samples

const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', 'https://fakestoreapi.ru/user');
xhr.setRequestHeader('Accept', 'application/json');
xhr.setRequestHeader('Authorization', 'Bearer {access-token}');

xhr.send(data);

GET /user

Example responses

200 Response

Responses

Status
Meaning
Description
Schema

5XX

Unknown

Server error

None

4XX

Unknown

Check response message

None

To perform this operation, you must be authenticated by means of one of the following methods: bearer

Update user info

Code samples

PATCH /user

Body parameter

Parameters

Name
In
Type
Required
Description

body

body

true

none

Responses

Status
Meaning
Description
Schema

200

User info updated

None

5XX

Unknown

Server error

None

4XX

Unknown

Check response message

None

To perform this operation, you must be authenticated by means of one of the following methods: bearer

Update user password

Code samples

PATCH /user/password

Body parameter

Parameters

Name
In
Type
Required
Description

body

body

true

none

Responses

Status
Meaning
Description
Schema

200

User password updated

None

5XX

Unknown

Server error

None

4XX

Unknown

Check response message

None

To perform this operation, you must be authenticated by means of one of the following methods: bearer

Last updated