register( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Registers a new site member.

The specified password must be between 4 and 100 ASCII characters.

Note: The register() function behaves differently depending on your site's member signup settings.

Method Declaration
Copy
function register(
  email: string,
  password: string,
  options: RegisterOptions,
): Promise<RegisterResponse>;
Method Parameters
emailstringRequired

Login email address for the new site member.


passwordstringRequired

Password the new site member will use to log in.

Must be 4 to 15 ASCII-printable characters.


optionsRegisterOptions

Options for registering a new member.

Returns
Return Type:Promise<RegisterResponse>
JavaScript
import { authentication } from "wix-members.v2"; async function register(email, password, options) { try { const result = await authentication.register(email, password, options); return result; } catch (error) { console.error(error); // Handle the error } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?