Approving an already-existing user through API?


(Frank Bailey) #1

I have created 17500 users via the Discourse API and uploaded all user avatars with the help of some very nice people here on Meta Discourse. All these users are in a “pending” state, and I would like to approve these users in bulk via the API. However, I only see an API endpoint to “activate” a user. As all my users are already active (but not approved) my question is, can I approve the users via the API, or must approval be done manually by the screenfull in the admin backend of Discourse? 17500 users will be a lot to have to approve manually.

Thanks in advance!


(Frank Bailey) #2

I must also mention here that my user creation calls already had “approved” set to “true”, however this did not actually set the users to the approved state on creation.


(Régis Hanol) #3

This topic might come handy :wink:


(Frank Bailey) #4

Thanks, that was an interesting read and very helpful.

For anyone finding this topic on the Googles, this is the syntax I used: