Form Register() function not found error 404

Hi,
I am just trying to register the member using “register” api. But it says it cannot find the specified path. 404 found.
My requirement is to send basic from fields + registration options". But in the code attached as a first step I am trying to access register API only, which is not happening
My Code:
import wixUsers from ‘wix-users’;
$w.onReady(function () {
//TODO: write your page related code here…
$w(‘#button1’).onClick( () => {
let email = $w(‘#input3’).value;
let password = $w(‘#input4’).value;
wixUsers.register(email,password)
.then((result) => {
let resultStatus = result.status;
console.log(“Result STatus :” + resultStatus);
},(error) => {
console.log(error);
});
});
});
Error:
HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier). (XHR)POST - https://editor.wix.com/api/wix-sm/v1/auth/register.
Please assist.

Hi,
The example above is fine, maybe you are testing it in the editor (preview mode)? some of the API won’t work there. Notice the documentation note here - Page Not Found - Velo API Reference - Wix.com

The APIs in wix-users are only partially functional when previewing your site. View a published version of your site to see their complete functionality.
Please give it a try in the published site.

Good Day,

Is this still the case i.e., does preview mode not support wixUsers.register() functionality yet?

I receive a 404 error while testing in preview mode.

Please clarify.

Thanks

Hi,
Unfortunately yes, wixUsers.register() is not supported in preview mode.

My customers are getting an error 404 message when trying to register for my event even tho it is published. I just started having this issue this week.

If you are still experiencing this issue, please see this post for instructions on how to report a bug .