Finish a password reset

Set a new password using the one-time token from the reset email. Resetting a password signs the account out everywhere. That is the point of it: whoever knew the old password loses access immediately, on every device. The person resetting will need to sign in again with their new password. The token can be used once. If something goes wrong the whole reset is undone, so the same link can simply be tried again. No sign-in needed — this is for a user who cannot sign in.

POST
/auth/set-password

Request Body

application/json

The token from the email, and the new password.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.dual.network/auth/set-password" \  -H "Content-Type: application/json" \  -d '{    "token": "<token from the email>",    "new_password": "a longer and better passphrase"  }'
{}
{
  "code": 3,
  "message": "Key: 'limit' Error:Field validation for 'limit' failed on the 'lte' tag"
}
{
  "code": 13,
  "message": "internal error"
}