Password Recovery with Backendless

Hi All

Was hoping someone may know about configuring the API for password recovery with Backendless. I have managed to configure other Backendless APIs…but this, no joy.

I am following this document;

My set up is below but I am getting an error…

I figure that all I needed to do is an input field for the email, bind that to a page variable, and then use that in URL as a placeholder.


Hmm I haven’t used backendless password recovery, but I’m guessing email is not the correct url placeholder for this, instead it should be some sort of user id or username? Maybe try one of those instead of email.

Also I’m not sure if this is related or if I’m misunderstanding something, but the request URL on that docs you linked seems to be while the one you have configured is eu.backendless...

Thanks Cecilia

The URL is fine…the difference is due to me using the European version of Backendless.

I am reasonably certain it is the email that I should use, because that is what the user will enter to confirm the account that needs the password reset. They won’t know the user id as that is used only in the backend. I will try it though, and see what happens.

Ah yes I read more about the Backendless documentation and apparently the identifier can be defined as whatever property like the email, in which case this setup is fine.

So hmm, everything seems okay, what sort of error are you getting?

Hey Cecilia

This is the response;

Where my knowledge is limited is around encoding. The Backendless docs mention encoding as required, so I have this;

I thought for a second that when I test I should be encoding the email address…which I did……but I get the same response.

The other mentionable thing is that when I test, the error doesn’t come up immediately…almost like it is trying but then fails!!!

I see, I was going to suggest manually encoding the email next but that didn’t work either. Btw, go ahead and delete that first screenshot so any sensitive info is not shared here :slight_smile:

If you open developer tools on that page (right click on the page, choose Inspect, and open the Console tab) and then try Run test, can you see any errors appearing?

1 Like

Ha, you just taught me something…I need to use this more. I dont understand what it means though :slight_smile:

Yes the developer console is handy in getting a more detailed error, Composer usually throws the CORS error as a default, event though the problem may not lie in CORS. Backendless should not have a CORS issue with AppGyver, so I think the issue still lies elsewhere. Are your other backendless requests succeeding?

A couple of things to check in Backendless:

  • You have set email as the identity property in your User properties for this app
  • Looking at these instructions, check that the Domain Control has the star * (like in the screenshot)

Hi Cecilia
Yes, those two things are correct.
I have other APIs with working with Backendless fine…I reference multiple data tables, and also have sign up, log in, pull and display User details, and update and return user details. This is the last piece of the puzzle, reset password if the user has forgotten and only knows email.
It took me a while to get each one working, but eventually muddled through and they work great now. This one is killing me though…

How strange, everything should be alright then! I can go and take a look if you provide me your app id :slight_smile: the id is the number sequence found in the url of your app

That would be great if you are still around. 179067.
Also, I am really struggling to get my persisted user key to work. The app reopens and skips the login page but there are two key points here;
I can only get it to work (…skipping the login page) if I set the flow for ‘Get item from Storage’ after the event ‘Page Focused’ rather than ‘Page Created’
When I return to the app it skips the log in page but the App Variable has not been populated…I cannot figure out why the IF function is determining that there is a record stored and dismissing the initial view but the app variable is then not populated with it. In my initial session, I pull the app variable from storage on main menu page (so after I have logged in), so I know it has stored…but when I return to the app after closing it without logging out, that app variable is not populating.

Hey! I tried the password reset request in Postman, and got the message use instead. So changing to seemed to do the trick! Testing it in Composer seems to return SyntaxError: Unexpected end of JSON inputstatus: -1, but this is because the test tab cannot handle empty request returns. So using Get Record should still be fine :slight_smile:

For the persisted user, you seem to using the authUser to set the value of authUser. This won’t work, since authUser is empty at the start. So you’re trying to fill an empty app variable with the same app variable, so it will end up empty. I’m guessing you want to populate the variable with whatever is found from the storage? So set the variable with a formula instead, outputs["Get item from storage"].item. The formula editor will give a waning, because it doesn’t know if the formula outcome and app variable types will match, and that can be ignored :slight_smile:

You are the best!

  1. You had mentioned the url before but when I checked it, I just didn’t see eu-api.backendless… verus eu.backendless… my bad!

One more point on that, any ideas how I can put an alert on the password request button, if there is no response to the API. I have added ‘email’ to the response schema and added ‘email’ to ‘response key path’ but I figure from your last response, it will not bring back a response no matter what I do?

  1. It didn’t make sense to me either but I was just blindly following the document…I did think I needed to use the ‘output of another node’ option but couldnt get that to work, but the formula was there in the IF node the whole time!!!

Thanks again

Great that it’s working!

Yes, the Get Record for the password reset will not return anything, I’m guessing it just sends the email to the user where they can reset their email. If the request fails, it will send some sort of error message. You can add alerts to both outputs of the Get Record node, the upper one is the succeeding output (so something like “success, check your email”), and the lower one is the failing output (so maybe something like “something went wrong”). You can also access the failing output’s error message with the outputs["Get Record"].error, if you want to set that as the alert dialog message :slight_smile:

Hey Cecilia
Probably should start a new topic but…
Just been fixing the last few issues and all of a sudden, the preview in the app wont load…jut getting the white screen with the spinner. I really haven’t done much to my app, so wanted to ask if there is an issue with the preview app today?


1 Like

mine too… did you figure it out?

It was me, I had changed an event on my initial view page from ‘Page Focused’ to ‘Page Created’…very slight change but I had forgotten about it…it broke my first page so the app wouldn’t open.