# Creating user via API

**URL:** <https://meta.discourse.org/t/creating-user-via-api/36133>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [29.Ноябрь.2015 20:18:49 UTC](https://meta.discourse.org/t/creating-user-via-api/36133 "2015-11-29T20:18:49Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![cck197](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cck197/32/110338_2.png) [@cck197](https://meta.discourse.org/u/cck197)\
**Post date:** [07.Декабрь.2018 21:33:59 UTC](https://meta.discourse.org/t/creating-user-via-api/36133/9 "2018-12-07T21:33:59Z")

</div>

Hi, I think I’m having similar trouble using the [pydiscourse](https://github.com/bennylope/pydiscourse) module.

If I create a user with `active=true` I get the following response:

```plaintext
{'success': True,
 'active': True,
 'message': 'Your account is activated and ready to use.',
 'user_id': 212}

```

And all seems well on the dashboard:

 ![19%20PM](https://global.discourse-cdn.com/meta/original/3X/2/6/266c1d01b02aebfd1422e04437c14a9a77b95ca4.png)

However, when I attempt to log in using my newly created account I see this:

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/c/8ccf77fd23fa9c93feefc36ca64a71cf90900a61.png)

Weird! OK, let’s resend the activation email (even though none was sent originally).

The email comes through and I open the link inside:

 ![image](https://global.discourse-cdn.com/meta/original/3X/5/9/59a31323d3dcc9cc8b105134bdfebac80fb07b6c.png)

Only the button doesn’t do anything!

I tried adding an HTTP get to `/admin/users/<user_id>/approve` and the API call returns something sensible, but still I get the “You can’t log in yet” message when I attempt to log in.

Does anyone have any clues as to where I went wrong?

Thank you!

---

_[View the full topic](https://meta.discourse.org/t/creating-user-via-api/36133)._
