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

Required Arguments

Argument

Type

Description

code

String

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
  }
}

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