User API
Use the REST API to interact with EverShop users.
Login
Use this endpoint login a user.
Request Schema (application/json)
Field Name | Field Type | Required |
---|---|---|
string | Yes | |
password | string | Yes |
POSTadmin/user/login
- cURL
- JavaScript
curl
-H "Accept: application/json"
https://<your domain>admin/user/login
fetch('https://<your domain>admin/user/login', {
headers: {
'Accept': 'application/json',
}
})
.then(response => response.json())
.then(data => {
if(data.error) {
// Handle the error
} else {
// Handle the data
}
})
.catch(error => {
// Handle the error
});
Sample Of Response
{
"data": {
"sid": "auxzei_bEdRGT-HwfACmq7D5XyHf2l5M"
}
}
Logout
Use this endpoint to logout a user.
Request Schema (application/json)
No request body requiredGETadmin/user/logout
- cURL
- JavaScript
curl
-H "Accept: application/json"
https://<your domain>admin/user/logout
fetch('https://<your domain>admin/user/logout', {
headers: {
'Accept': 'application/json',
}
})
.then(response => response.json())
.then(data => {
if(data.error) {
// Handle the error
} else {
// Handle the data
}
})
.catch(error => {
// Handle the error
});
Sample Of Response
{
"data": {}
}