DHIS2 API - create user accounts (user id and userCredentials id)

Hi, community,
I have about 30 users and I want to use the API to create the accounts. On the payload we have the id (users id) and the userCredentials id. I know the user id is unique for every user, is this the same case for the userCredentials id and is it mandatory? If I leave it out will DHIS2 automatically generate it?

image

Hi @tiha,

Hope, it will be helpful for you: http://dhis2trainingland.com/eportal/?tutorial=dhis2-user-create-using-web-api

Regards
Julhas

1 Like

I have developed an app ‘Users Importer’ to create bulk users under a parent facility with random user id and password. If you want, I can build it for you.

2 Likes

Hi @julhas,

also, share to me :smiley:

Hi Julhas,
Thanks for sharing the link, that was really helpful. I also managed to upload my payload with both user id and userCredential id, DHIS2 did not complain so I guess it’s okay to have it. Will test without it and see what happens.

That’s a great app for bulk user uploads, I know where to find one and a larger need arise.

regards

2 Likes

Hi @taufiqhs,

Sure, Let me share you. :slightly_smiling_face:

Thanks

2 Likes

Thank you very much (Terima kasih) @julhas

2 Likes