Error ID_REQUIRED when calling POST /v1/user
I am trying to use the Kinde Management API to create a new user.
I have already configured everything properly.
When calling GET on /v1/users it responds with 200 and shows me a list of my users.
However, when calling POST on /v1/user, I am getting a 400 Bad request.
Here is my request body, taken straight from the documentation (https://kinde.com/api/docs/#create-user):
{
"profile": {
"given_name": "Bob",
"family_name": "Test"
},
"identities": [
{
"type": "email",
"details": {
"email": "[email protected]"
}
}
]
}
And here is the response:
{
"errors": [
{
"code": "ID_REQUIRED",
"message": "ID is required"
},
{
"code": "USER_INVALID",
"message": "User invalid"
}
]
}
8 Replies
Very bizzare @internetjohnny as the POST request seems to be wanting the userid. Let me check with the team for you.
Hey @internetjohnny - from the screenshot, looks like it's directing to a GET request still (next to {KINDE_API_DOMAIN/v1/user) - if you update that to POST and try the request again, that should get it going - let me know if you run into any further issues there? Thanks!
Oh god, I feel so dumb... Sorry to take up your time guys, and thanks again for pointing out this very obvious mistake π€¦ββοΈπ€¦ββοΈπ€¦ββοΈ
Not at all! I've run into the same thing multiple times too haha, please reach out if you have any more qs π
While I have you guys here, quick question: so, my goal is to be able to create a user in my own database, as soon as the user creates an account using Kinde.
As I understand it, I have to use the Kinde Management API at the moment, since you guys dont have a webhook out yet. And this means I would have to create my own UI for creating an account as well as logging in, is that correct?
Sorry I might asked this else where, what Kinde SDK are you using? As I can prepare answer to help you
Iβm using the NextJS App Router SDK v2. I feel like your reply here may have already answered my question: https://discord.com/channels/1070212618549219328/1185394899177189467/1186084860985626746
Awsome to know @internetjohnny