Need to get Wix User ID from Email in HTTP API

Hi,
I have written a Http-api to connect to an external application.
So I need to get the user ID string of a registered user from their login Email.

I know I can do this by querying the “Members/PrivateMembersData” collection, but when I try the following code, I get an error message :

{"error":{"code":"WD_UNKNOWN_ERROR"},"approved":true}

Here’s the code:

export async function get_loginUser(request)
{
 let response = {
 "headers": {
 "Content-Type": "application/json",
 "Access-Control-Allow-Origin": "*",
    }
  };

 let email=request.path[0];
 let password=request.path[1];

 return wixUsers.login(email, password)
  .then(async function (sessionToken) {

    console.log(wixUsers.currentUser.id);
    console.log(sessionToken);
 
 return wixData.query("Members/PrivateMembersData")
    .eq("loginEmail",email)
    .find()
    .then( async function (results){
 
      response.body={"userID":results.items[0]._id, "approved": true};  
 return ok(response);
 
    })
    .catch( (err)=>{
      response.body={"error":err, "approved": true};  
 return ok(response);
    });

 /*return wixCrmBackend.createContact({"emails":[email]})
    .then(function (contactID){

      console.log(contactID);
      response.body={"userID":contactID, "approved": true};
      return ok(response);
    })
    .catch((err)=>{
      response.body={"error":err, "approved": true};
      return ok(response);
    });

  response.body={"sessionToken":sessionToken, "approved": true};  
  return ok(response);*/

  } )
  .catch( (error) => {
    response.body={"approved": false, "reason": error};
 return badRequest(response);
  } );

}

Is it possible to use supressAuth with query, or pass some kind of user credentials with the HTTP GET REQUEST??

Need help ASAP thanks