API Functionality for invites

(Alexandros Nikolopoulos) #1

I have deployed a discourse installation which is invite only and I am looking for a way to trigger invitations from another website. However, I don’t want to invite users to a specific topic, but to the forum in general. The ideal solution for this is to have invites generated from the user profile page functionality.

Is there a way to generate invites from the API that will not tie the invite to a specific topic? Bonus points if it is possible to add the user to specific groups.
FYI, I’m going to implement this in python so I’m not looking for a solution via the ruby reference api implementation (And I checked that it doesn’t support it), however in the routes.txt file I can see some invitation specific endpoints. Do these work? If yes, how can I call them?

(Jeff Atwood) #3

Frank neither of those has anything to do with API, they are part of the standard user interface on your user page, Invites tab.

(Alexandros Nikolopoulos) #4

Frank, thanks for the info, but it is not what I’m looking for. To be more specific, I don’t want to use the bulk invites functionality, I want to be able to do it on per user basis, just not tied to a specific topic.

At this point I’m thinking of diving in the server code to look into it myself, but I have no ruby experience whatsoever!


Okay. I understand. I will pull my comment. I don’t want to add confusion. Thanks for clarifying.

Sorry about that @codinghorror :confused: It was late and I was ‘scanning’ the question.

A bad answer is worse than no answer…

(Arpit Jalan) #6

Sent a PR to add Invite User functionality, without tying the invite to a specific topic:


Yes, it is possible to add (invite) a user to specific/multiple groups. :slight_smile:

(Alexandros Nikolopoulos) #7

Works like a charm. Thanks!