Our servers need some time (not sure about the exact time) to delete the user from our database so you can’t do requests to create the user again after a few milliseconds you have deleted the user.
There is a database cache that the user might still be there even though the user was deleted from the actual database. If you would try now to create the user it should be fine.
Hello @Chinmaya_Gupta. I am facing the exact same issue. I deleted a user over 1 hour ago, and tried to create a new one but it’s still giving me a user_id constraint.
In my case, I am creating / deleting users based on their subscription status change on my website. If the user subscribes, a Sendbird account is created. If the user unsubscribes for example, the Sendbird account gets deleted. Since there is caching involved, am I better off deactivating/activating users instead of deleted/creating them on every subscription status change?
It seems that I was able to create the user again with the same ID after about 2 hours after I deleted it. To avoid this complication, I switched to activating/deactivating users instead. Hope this information helps.