Creating user via API

Hi, I think I’m having similar trouble using the pydiscourse module.

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

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

And all seems well on the dashboard:

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

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

The email comes through and I open the link inside:

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!