Can I update (add to) "allowed_users" of a topic via an API call?

(Matthew Twomey) #1

I’d like to be able to add users to “allowed_users” of a topic. When I retrieve a topic, one section is details.allowed_users. Is there a way to add additional users here with a PUT?

(Vinoth Kannan) #2

Yes you can.

As per above code I am sure by inviting you can add any user to allowed_users list.

(Matthew Twomey) #3

I apologize, my ruby experience is fairly limited - can you give me a pointer on how to infer the needed API call to do that? Not asking anyone to do it for me, but maybe a pointer?

(Matthew Twomey) #4

bump Anyone know if this is possible via the existing API?

(Blake Erickson) #5

You can use this endpoint to invite a user to a topic.

BODY "username": "string"

If you are using the ruby discourse_api gem you can use this method: invite_user_to_topic