Description

Users may change their password through the user interface or via API call. You may change your password here: https://roadmentor.hyperspec.ai/settings/change_password

User Interface

22042204

Code Example

import requests

url = "http://localhost:3000/users/change_password"

payload = "current_password=[prev_password]"
payload += "&new_password=[new_password]"
payload += "&confirm_password=[new_password]"

headers = {
  'Accept': '*/*',
  'Accept-Language': 'en-US,en;q=0.9',
  'Cache-Control': 'no-cache',
  'Connection': 'keep-alive',
  'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
curl --location --request POST 'http://localhost:3000/users/change_password' \
--header 'Accept: */*' \
--header 'Accept-Language: en-US,en;q=0.9' \
--header 'Cache-Control: no-cache' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' \
--data-raw 'current_password=[prev_password]&new_password=[new_password]&confirm_password=[new_password]'
POST /users/change_password HTTP/1.1
Accept: */*
Accept-Language: en-US,en;q=0.9
Cache-Control: no-cache
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

current_password=[prev_password]&new_password=[new_password]&confirm_password=[new_password]
var settings = {
  "url": "http://localhost:3000/users/change_password",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Accept": "*/*",
    "Accept-Language": "en-US,en;q=0.9",
    "Cache-Control": "no-cache",
    "Connection": "keep-alive",
    "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
  },
  "data": "current_password=[prev_password]&new_password=[new_password]&confirm_password=[new_password]",
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'http://localhost:3000/users/change_password',
  'headers': {
    'Accept': '*/*',
    'Accept-Language': 'en-US,en;q=0.9',
    'Cache-Control': 'no-cache',
    'Connection': 'keep-alive',
    'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
  },
  body: 'current_password=[prev_password]&new_password=[new_password]&confirm_password=[new_password]'

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});