Change users state from an external process, create session via the REST API

Hello,

I need to change the status of a user from an external process, like to indicate that is is currently busy.
I try to do it with the REST API but I don’t see any possibility…

I can also maybe use an external XMPP client but in that case I will need to store a copy of the user password so it’s not the best or maybe it’s possible to trust an IP and allow login without password ?

any idea how I can do it ?

BR

Laurent