I have a problem with deleting and creating users through the API. I have a script that used to work, and today it stopped (without any changes on my side). For instance, after deleting all users (via API), I cannot e.g. create a user with some email (that existed before, but was subsequently deleted), neither via API nor via the website. If I try, I get the message “The user already exists.” At the same time, the list of users (available on the website) does not include such a user.
There has been similar reports of this situation, but it was never possible to reach a clear sequence of steps that would reproduce the situation in order to more quickly diagnose the root cause. In addition, these situations have in general been associated with non real world scenarios, more specifically, they seem to happen as part of automated and bulk creation and subsequent deletion of users as part of test scripts.
If you can share information about exact API endpoints involved, sequence of calls, timings between creation and deletion, amount of calls being made, characteristics of the users being created, type of connections or any other information that can help reproduce the situation that would be great.
In addition, if this is indeed happening as part of test scenarios there may be other ways to achieve the same goal and that does not require rapid creation and deletion of users. You can also consider if deleting the connection or trying the delete users by email endpoint is something that can address the situation.
I am having this same issue. Users that are deleted via delete by id are no longer searchable via search endpoint or visable in the dashboard. However, when I then try to create a user with the same email as a user I just deleted through the create endpoint, I get “The user already exists.” The delete users by email did work for me and then I was able to recreate the users properly. I can reliably reproduce this on my account every time.
But I’m generally unclear why, and what the difference really is in deleting between the 2 different delete endpoints. Why exactly should the delete by email work and the delete by id not?
I do not believe this has to be a bulk operation for this issue to occur (depending on what you consider “bulk”). I have a script that is usually only creating about ~10 users at a time, and a separate one to delete them. The scripts themselves are not run in an automated fashion, they are manually run approximately once every few days, so this does not only manifest in bulk/higher traffic situations.
I am using the default Database connection, username-password authentication. The users being created have no additional user or app metadata associated with them, we are passing nothing aside from email/password/verify_email on user create.
Thanks for your input, molly. We are also creating only about a dozen users by a script (although we sometimes run it a few times a day). In a minute, I’m sending an email to ask whether there is any progress on this.