Using 1.8.0.beta9. I’m doing:
curl -d "api_key=<snip>&api_username=system&username=USER&name=USER&email=USER@example.com&password=1fe2fdd3b3939b8755a073557c74c0f5&approved=true&active=true" https://discuss.example.com
Note the &active=true
which according to the API docs, should get me an activated user: Discourse API Docs
But it never activates the user, and it always sends an activation email, the json reply is always:
{"success":true,"active":false,"message":"\u003cp\u003eYou're almost done! We sent an activation mail to \u003cb\u003eUSER@example.com\u003c/b\u003e. Please follow the instructions in the email to activate your account.\u003c/p\u003e\u003cp\u003eIf it doesn't arrive, check your spam folder, or try to log in again to send another activation mail.\u003c/p\u003e","user_id":44}
I’ve tried with &active=1
too, no luck.
I did read other threads on here, which were saying I should activate them by doing a second API call to /admin/users/{USER_ID}/activate.json?
but that doesn’t help me at all because the activation email was already sent … and it’s the very thing I want to avoid.
This sounds like a bug (either the code or the API docs).