Auth
Authentication
HTTP Authentication, scheme: bearer
Auth
User registration
Code samples
const data = JSON.stringify({
firstName: 'Evgeny',
lastName: 'Smirnov',
login: 'nodewalker',
email: '[email protected]',
password: '**********',
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', 'https://fakestoreapi.ru/auth/signup');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.setRequestHeader('Accept', 'application/json');
xhr.send(data);POST /auth/signup
Body parameter
Parameters
Name
In
Type
Required
Description
Example responses
200 Response
Responses
Status
Meaning
Description
Schema
5XX
Unknown
Server error
None
4XX
Unknown
Check response message
None
This operation does not require authentication
User login
Code samples
POST /auth/signin
Body parameter
Parameters
Name
In
Type
Required
Description
Example responses
200 Response
Responses
Status
Meaning
Description
Schema
This operation does not require authentication
Refresh auth tokens
Code samples
POST /auth/refresh
Parameters
Name
In
Type
Required
Description
rt
query
string
true
Refresh token
Example responses
200 Response
Responses
Status
Meaning
Description
Schema
5XX
Unknown
Server error
None
4XX
Unknown
Check response message
None
This operation does not require authentication
Last updated