I'm trying to update a user's email address from a different site through the API. Changing other user attributes (e.g. bio) works fine, but for email I get code 401 permission_denied.
This seems to happen because there are some checks in UpdateUserController and EditUserHandler that require additional user confirmation when $userId and $actor are identical. My question is, can I somehow specify in the API call that the $actor is an admin? Or is there any other way to change a user's email address through the API without requiring the user to confirm their new address?
I've come up empty after lots of searching, any hints much appreciated.