How to update a user data that is not authenticated?

Hello members!
In my project, I want to edit users in Parse.User() with an Admin user with Admin role.
But it throws an error with code 206.
After searching in documents, in this URL, I find out its because the user that I need to edit is not authenticated.
Then how should I edit my users as an Admin?
Can you help me?

This is my code:

let q = new Parse.Query(Parse.User);

q.get(userid)
	.then(u => {
		u.set("code", code);
		u.save({ useMasterKey: true })
			.then(() => {
				// user updated
			})
			.catch((e) => {
				console.log("Error in updating user", e.code)
			})
	})
	.catch((e) => {
		console.log("user not found!", e.code);
	});

Thanks.
Regards.

Did you try following code:

u.save(null,{ useMasterKey: true })

notice the null as the first parameter of save()