Reset Password
Reset a user's password
The resetPassword mutation will reset the user's password through a code previously generated by the requestResetPassword mutation.
Requirements
Execute the
requestResetPasswordmutation in order to get the code to be used to reset the password.
Required Arguments
Argument
Type
Description
newPassword
String
The User’s new password
Available Fields
Field
Type
Description
success
Boolean
True if the reset password has been updated successfully
False if the reset password has not been updated successfully
message
String
Description of the result
Examples
The following example updates the password by using a giving reset code.
Graphql Example
mutation {
resetPassword(code: "ZWE3MWQ0ZjktZDJkYS00NGMzLWE1NjQtNjE3NTUyNTJlY2I4OjVyNy00MzYyYzdkNGRmNGM1NzMwNTlmOA==", newPassword:"myStrongPassword") {
success
message
}
}{
"data": {
"resetPassword": {
"success": true,
"message": "Your password was successfully updated!"
}
}
}Curl example
curl --location --request POST 'https://production.suggestic.com/graphql' \
--header 'Authorization: Token <API-Token>' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation {\n resetPassword(code: \"<reset-code-b64>\" newPassword: \"<new-password>\") {\n success message\n }\n}","variables":{}}'Last updated
Was this helpful?