-
Hey folks, I am working with the Admin API in order to create users programmatically from my own API, after a certain webhook is triggered. Unfortunately, I cannot find what the proper data are for POSTing to I though of inspecting the request that is sent from the fief dashboard and I ended up with something like this:
Even with these data, I get In the above, the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
After some tinkering with a REST client, I figured out that the request data should indeed be in JSON format.
This will indeed register a user programmatically. Still working on finding out whether's possible to POST custom user fields. |
Beta Was this translation helpful? Give feedback.
-
My bad. Essentially what is returned from the POST endpoints, are values you can also pass to the request as data. So, for anything you want to add to user fields, you have to use https://example.fief.dev/admin/api/docs#/Users/users_update_users__id__patch Leaving this here for anyone that might have the same (naive) question as me in the future. Cheers. |
Beta Was this translation helpful? Give feedback.
-
Hi @pcnoic 👋 Thanks for raising this point, I didn't notice OpenAPI was not generated correctly for this endpoint. Opening a issue to fix this! |
Beta Was this translation helpful? Give feedback.
My bad. Essentially what is returned from the POST endpoints, are values you can also pass to the request as data. So, for anything you want to add to user fields, you have to use
fields: {}
.https://example.fief.dev/admin/api/docs#/Users/users_update_users__id__patch
Leaving this here for anyone that might have the same (naive) question as me in the future. Cheers.