POST
https://api.cryptohopper.com/v1/user/password
Sets a new password for the user. The password must be 8 to 255 characters long.
OAuth scope:
user About scopes
The current password and a two-factor code are not asked for.
Example request
curl -X POST "https://api.cryptohopper.com/v1/user/password" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"password":"CHANGE_ME"}'
const response = await fetch('https://api.cryptohopper.com/v1/user/password', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"password": "CHANGE_ME"
})
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/user/password",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"password": "CHANGE_ME"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/user/password');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'password' => 'CHANGE_ME',
]),
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Required | The OAuth access token of the user. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
password | string | Optional |
Response
{
"data": "The password has been changed."
}