Code 4000 error with user registration or password reset

Hello.

I was wondering if anyone can help me with using the user registration and password reset API’s and workflow.

For my app, “email” is the user identity column in the users table (I use a different UI builder and connect via REST API, and use the BACKENDLESS native endpoint for North America: https://api.backendless.com/application-id/api-key/users/restorepassword/email or …/users/register/email)

  1. new users are able to register their account using the API documentation. They are sent an email with a clickable link to activate their account. When they click this link, they get the following error:

{“code”:4000, “message”:“User has no permissions for specified resource”,“errorData”:{}}

However, despite the error code, they successfully register a new account when clicking the link and can successfully login and use their account.

  1. When a user clicks “forgot password”, they are successfully sent an email with a link to reset their password. However, when they click the link, they get the following error message:

{“code”:4000, “message”:“User has no permissions for specified resource”,“errorData”:{}}

In addition, they are not redirected anywhere to reset their password.

Thanks.

Hi Rick,

It sounds like a problem related to the permissions setup. Could you please share your application ID, and we will look at the permissions config in your app?

Regards,
Mark

Thanks for getting back to me so quickly!

My application ID is: 79ECD862-DC71-F21C-FFF3-1143FD389500

Hi Rick,

I believe the link users get in their email points to a page deployed in the /web directory in your application. I checked the permissions for the /web directory and I see that the Read operation is denied for the non-authenticated users:

I believe that is the root cause of the errors you described.

Regards,
Mark

Thanks, I’ll check it out, much appreciated

Thanks Mark. Good news / bad news. Good news- you were correct, changing the web folder permission for notAuthenticatedUser, read to permitted fixed the problem, thanks.

Bad news- I was trying to edit the default index.html file for password recovery and register user and accidentally deleted the “default” container. That seems like a big deal- is there any way you can help me undo my error on your end (the Backend as it were)?

So sorry to ask.

Rick

Hi Rick,

It should be easy to restore. Navigate to the BACKUPS tab on the UI Builder screen. You should be able to restore the container from there.

Regards,
Mark

Thank you Mark