Cannot request password recovery... REST API

Backendless Version (5.x ??)

Client SDK (REST)

Application ID: FF55A111-06AF-7EB1-FFDE-B5B62760CA00

Expected Behavior

  1. type in displayName (identity) in my account name box…
  2. click button
  3. recieve an email if user is in db…

Actual Behavior

  1. type in displayName (identity) in my account name box…
  2. click button
  3. forgot password REST handler returns error code 3074 with a message: “Cannot request password recovery while there is no ‘email’ user property”

Where to put email property?

the user had email in the database, so i’m assuming I need pass the email to the function?
but where? body or header? and with what key:

SCREENSHOT OF ERROR:

Hi @JesterOC ,

Could you please point me to the page from the screenshot in your application or provide sample of request to the Backendless server?

Regards, Andriy

1 Like

ye ok… It’s in 3 parts…

part1: the script that does the http request:

/// @description bl_forgotpassword(username)
function bl_forgotpassword(username) {
with obj_backendless{
	// Headers
	var headers = ds_map_create();
	    headers[? "userHeaders"] = string(username);
		
	
	// Request
	bl_action = bl_actions.forgotpassword; // For networking event
	bl_request = http_request(bl_users+"restorepassword/"+string(username),"GET",headers,"");

	// Clearup
	ds_map_destroy(headers);
	ds_map_destroy(body);
	
	return bl_request;


}
}

Part 2: OBJ_ACCOUNT_FORGOT_BTN - LEFT MOUSE RELEASE EVENT:

if NET_wait_TCP == true or instance_exists(o_9slice_par) {exit;}//BAIL OUT

pressed = 0;
				
			 //with gmkboc_acc_emailbox { other._prepped_email = value;}
			 with gmkboc_acc_usernamebox { other._prepped_username = value;}
            
			//if not empty values... send register command.
			if _prepped_username != "" {
			
			bl_forgotpassword(_prepped_username);
			//emit_forgot_password(_prepped_username); //OLD
			start_NET_wait_TCP(700);
		//reset
		_pw = ""
		_prepped_username = ""
			}


AND part 3: (TOP OF obj_backendless ASYNC HTTP EVENT)…(Where it ends.)

  // If there was an error
    if (ds_map_exists(json,"code")) {
        // Error message
        var code = json[? "code"];
        var msg = json[? "message"];
        // Show message or something
        show_scaler_message("<col @c_red>"+string(msg), "OK");        
        // Abort
		finish_NET_wait_TCP()
		exit;
    }

PLEASE HELP…
I got stuck here…
All the other backendless REST functions I’ve used work so far…
(
Been following documentation…
tho, this page didn’t help much at all:
https://backendless.com/docs/rest/users_password_recovery.html
)

also bl_init script, so can see what bl_users value equals:

/// @description  bl_init(app_id,rest_key)
function bl_init(argument0, argument1) {

	// Credentials
	bl_app_id = argument0; // Application ID
	bl_secret = argument1; // REST Secret Key

	// API URL
	bl_base_url = "https://api.backendless.com/" + bl_app_id + "/" + bl_secret + "/";

	// Operation endpoints
	bl_users = bl_base_url + "users/";
	bl_data = bl_base_url + "data/";
	bl_files = bl_base_url + "files/";
	bl_msg = bl_base_url + "messaging/";
	bl_geo = bl_base_url + "geo/";

	// Init
	bl_request = noone; // Request ID
	bl_action = -1; // Current action (for processing in HTTP event)
	bl_token = ""; // Session token

Hello,

This is a very strange problem. I tried the same API request in my test app and it worked just fine, but I was able to reproduce the problem in your app. I opened a ticket for the dev team to investigate the problem: BKNDLSS-27583

Regards,
Mark

1 Like

Ye, it’s strange…
the same request was working from my python server… Tho codes are slightly differ, they are essentially the same request…

I ported it over, but ye… now it’s not working.

FOUND THE ISSUE:
(I HAD TURNED OFF COLUMN VISIBILITY FOR EMAIL, ( WAS THINKING OF SECURITY ) )

I HAVE SINCE TURNED ALL ROLES EMAIL VISIBILITY BACK TO ON…

Hi @JesterOC,

I have some news about the problem you had. We have updated the cloud servers to fix the problem you described. We are sorry that it took so long to fix the problem. Passwordless login now does not take into account the visibility permission for the email column.

Regards,
Marina