Bad request when enabling / disabling user

If I use either of the enable / disable calls to enable or disable the user I am getting a 400 Bad Request error.
I am passing the correct objectId for the user.

Here is the code. I don’t see what can be incorrect in it, anyone have any ideas?

Backendless.UserService.enableUser( savedObject.objectId )
.then( function() {
	//do stuff				 
})
.catch( function( error ) {
 	//do stuff	
 });

Do you use that API in cloud code?

No, I’m calling it from JS in a webapp.

And I just spotted in the API docs that it can’t be used like that. Thanks @mark-piller

1 Like