Hello Dataverse Community,
According to the documentation:
Create an Authenticated User: https://guides.dataverse.org/en/5.10/api/native-api.html#id169
What is the correct curl command to do that please ?
I have tried with -H "Content-Type: application/json" and --upload-file my_file.json where i have indicated the dictionary. This is not working.
And I have tried with -d and pass the dictionary directly: curl -H "X-Dataverse-key: $API_TOKEN" -X POST localhost:8080/api/admin/authenticatedUsers -d $TEST_AUTH_USER
I'm probably doing a mistake in the command,
Thanks in advance for your help,
regards
Those docs are terrible (please feel free to create an issue!) but this worked for me:
$ curl -H "Content-Type: application/json" http://localhost:8080/api/admin/authenticatedUsers -X POST --upload-file user.json
Thank you Philip for your confirmation on this command.
EDIT 3: Ok seems to work, if I have already the user in database, the API return just an empty braces
If not I've got a detailed response which is ok.
@Phlip: is it correct that you don't need API_TOKEN here to do this?
This means that everyone who can access locally can add a user?
Regards
Julien C has marked this topic as resolved.
That's correct. You don't need an API token for this one. Again, the docs are not great. Please feel free to open an issue.
Last updated: Nov 01 2025 at 14:11 UTC