PATCH
https://api.cryptohopper.com/v1/user/resetpassword
Completes a password reset: checks the verification code from the reset email and sets the new password. Needs no access token.
The new password travels in the query string. The same User-Agent check as Request a password reset runs first.
Example request
curl -X PATCH "https://api.cryptohopper.com/v1/user/resetpassword?username=USERNAME&password=PASSWORD&code=CODE&password_verify=PASSWORD_VERIFY" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/user/resetpassword?username=USERNAME&password=PASSWORD&code=CODE&password_verify=PASSWORD_VERIFY', {
method: 'PATCH',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.patch(
"https://api.cryptohopper.com/v1/user/resetpassword",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
params={
"username": "USERNAME",
"password": "PASSWORD",
"code": "CODE",
"password_verify": "PASSWORD_VERIFY"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/user/resetpassword?username=USERNAME&password=PASSWORD&code=CODE&password_verify=PASSWORD_VERIFY');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
],
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Optional | The OAuth access token of the user. |
Platform |
string | Optional | Platform of the client: web, ios or android. Defaults to web. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
username |
string | Required | Username of the account. |
password |
string | Required | New password; must meet the Cryptohopper password policy. |
code |
string | Required | Verification code from the password reset email. |
password_verify |
string | Required | Must be the same as password. |
Response
{
"data": "Password has been reset."
}