Creating Active Users via the API gem

I believe this is now possible as have just tested it and seems to work ok -

{
"name": "string",
"email": "string",
"password": "string",
"username": "string",
"active": true,
"approved": true,
}

http://docs.discourse.org/#tag/Users%2Fpaths%2F~1users%2Fpost

I used the active = true and approved = true when creating a new user and got the response (with no email sent) -

    {
        "success": true,
        "active": true,
        "message": "Your account is activated and ready to use.",
        "user_id": 2
    }

where as if I set them to false - I get the email and a response

{
    "success": true,
    "active": false,
    "message": "<p>You’re almost done! We sent an activation mail to <b>###@gmail.com</b>. Please follow the instructions in the mail to activate your account.</p><p>If it doesn’t arrive, check your spam folder.</p>",
    "user_id": 3
}
1 Like