K
Kindeβ€’12mo ago
internetjohnny

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" } ] }
No description
8 Replies
onderay
onderayβ€’12mo ago
Very bizzare @internetjohnny as the POST request seems to be wanting the userid. Let me check with the team for you.
viv (kinde)
viv (kinde)β€’12mo ago
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!
internetjohnny
internetjohnnyOPβ€’12mo ago
Oh god, I feel so dumb... Sorry to take up your time guys, and thanks again for pointing out this very obvious mistake πŸ€¦β€β™‚οΈπŸ€¦β€β™‚οΈπŸ€¦β€β™‚οΈ
viv (kinde)
viv (kinde)β€’12mo ago
Not at all! I've run into the same thing multiple times too haha, please reach out if you have any more qs πŸ™‚
internetjohnny
internetjohnnyOPβ€’12mo ago
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?
onderay
onderayβ€’12mo ago
Sorry I might asked this else where, what Kinde SDK are you using? As I can prepare answer to help you
internetjohnny
internetjohnnyOPβ€’12mo ago
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
onderay
onderayβ€’12mo ago
Awsome to know @internetjohnny
Want results from more Discord servers?
Add your server