The purpose of the 2 Discourse API systems

User api was designed for this, see the source code of Discourse Hub for a reference implementation.