Reset password user
curl --request POST \
--url https://apiweb.mile.app/api/v3/member/reset-password \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "66791b2ef001a712b77b3627",
"password": "1QklJb@ap"
}
'import requests
url = "https://apiweb.mile.app/api/v3/member/reset-password"
payload = {
"userId": "66791b2ef001a712b77b3627",
"password": "1QklJb@ap"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '66791b2ef001a712b77b3627', password: '1QklJb@ap'})
};
fetch('https://apiweb.mile.app/api/v3/member/reset-password', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/member/reset-password",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '66791b2ef001a712b77b3627',
'password' => '1QklJb@ap'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/member/reset-password"
payload := strings.NewReader("{\n \"userId\": \"66791b2ef001a712b77b3627\",\n \"password\": \"1QklJb@ap\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apiweb.mile.app/api/v3/member/reset-password")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"66791b2ef001a712b77b3627\",\n \"password\": \"1QklJb@ap\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/member/reset-password")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"66791b2ef001a712b77b3627\",\n \"password\": \"1QklJb@ap\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"property": {
"_id": "66791b2ef001a712b77b3627",
"hubId": [
"66a98d2e598d9f20f63764f2"
],
"organizationId": "66791b2bf001a712b77b3622",
"updatedTime": "2024-12-29T12:38:39+00:00",
"lastLogin": "2024-12-28T12:03:56+00:00",
"isDeleted": false,
"docId": "66791b2ef001a712b77b3627",
"roleId": "66791b2cf001a712b77b3623",
"teamId": [],
"name": "User",
"createdTime": "2024-06-24T07:07:26+00:00",
"email": "user@mile.app",
"status": "active"
},
"message": "Your password has been updated successfully."
}{
"status": false,
"message": "You cannot use a password that you have used before."
}{
"status": false,
"statusCode": 404,
"message": "Data not found. Please check the ID/reference number and try again."
}User
Reset password user
This endpoint for reset password of the specific authenticated user and Only the Owner role can reset the password for another Owner.
POST
/
member
/
reset-password
Reset password user
curl --request POST \
--url https://apiweb.mile.app/api/v3/member/reset-password \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "66791b2ef001a712b77b3627",
"password": "1QklJb@ap"
}
'import requests
url = "https://apiweb.mile.app/api/v3/member/reset-password"
payload = {
"userId": "66791b2ef001a712b77b3627",
"password": "1QklJb@ap"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '66791b2ef001a712b77b3627', password: '1QklJb@ap'})
};
fetch('https://apiweb.mile.app/api/v3/member/reset-password', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/member/reset-password",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '66791b2ef001a712b77b3627',
'password' => '1QklJb@ap'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/member/reset-password"
payload := strings.NewReader("{\n \"userId\": \"66791b2ef001a712b77b3627\",\n \"password\": \"1QklJb@ap\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apiweb.mile.app/api/v3/member/reset-password")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"66791b2ef001a712b77b3627\",\n \"password\": \"1QklJb@ap\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/member/reset-password")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"66791b2ef001a712b77b3627\",\n \"password\": \"1QklJb@ap\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"property": {
"_id": "66791b2ef001a712b77b3627",
"hubId": [
"66a98d2e598d9f20f63764f2"
],
"organizationId": "66791b2bf001a712b77b3622",
"updatedTime": "2024-12-29T12:38:39+00:00",
"lastLogin": "2024-12-28T12:03:56+00:00",
"isDeleted": false,
"docId": "66791b2ef001a712b77b3627",
"roleId": "66791b2cf001a712b77b3623",
"teamId": [],
"name": "User",
"createdTime": "2024-06-24T07:07:26+00:00",
"email": "user@mile.app",
"status": "active"
},
"message": "Your password has been updated successfully."
}{
"status": false,
"message": "You cannot use a password that you have used before."
}{
"status": false,
"statusCode": 404,
"message": "Data not found. Please check the ID/reference number and try again."
}Authorizations
Use a valid Bearer token to authenticate.
Body
application/json
⌘I