Reset a password through the API

Is it possible at all?

I know how to send a regular password reset request, which sends a link to the user's email. Ideally, though, this should be done within the app. I could ask the user to copy the token at the end of the URL in the email, but that is just begging for problems. If there was a way to at least send only the token part, it would be something.

Also, on a different (but related) topic: is it possible to disable password resets for certain user roles?