Call Discourse routes from inside the plugin (Ruby API)

How can I call a discourse api route from inside a custom plugin? I want to make the call directly between the plugin and the backend, and i want to do it from a custom ruby controller.

I am trying to make a custom route for creating a user, and I want to call UsersController.create to handle the creation of the user properly. Is there any way I can do it?

3 Likes