resetUserPasswordWithHttpInfo method

Future<Response> resetUserPasswordWithHttpInfo(
  1. String account,
  2. String user,
  3. ResetUserPasswordRequest resetUserPasswordRequest
)

Reset password

Fulfill a user's password reset request. Password reset tokens expire 24 hours after requesting the reset. For an example of self-hosting your password reset flow, please see this repo. Alternatively, you can use our Zapier integration. When the account is protected, and the user does not yet have a password set, they will not be able to set their initial password. Only admins may set the password for a passwordless user, unless the account is unprotected.

Note: This method returns the HTTP Response.

Parameters:

  • String account (required): The identifier (UUID) or slug of your Keygen account.

  • String user (required): The identifier (UUID) or email of the user to be retrieved.

  • ResetUserPasswordRequest resetUserPasswordRequest (required):

Implementation

Future<Response> resetUserPasswordWithHttpInfo(String account, String user, ResetUserPasswordRequest resetUserPasswordRequest,) async {
  // ignore: prefer_const_declarations
  final path = r'/accounts/{account}/users/{user}/actions/reset-password'
    .replaceAll('{account}', account)
    .replaceAll('{user}', user);

  // ignore: prefer_final_locals
  Object? postBody = resetUserPasswordRequest;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/vnd.api+json'];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}