You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2021-08-02 20:20:48

aziz
Member
Registered: 2021-03-30
Posts: 109

add user using api

Hello everyone


I'm using post request with this URL to add a user : glpi server/apirest.php/user/

{"input":{"name":"x","realname": "x", "firstname": "x" ,"password":"123" }}

And it works fine the user is added, but I can't log in with this user cause apparently the password is not set up. So I think I have a problem in my JSON I hope someone has and idea about this appreciate any help

Offline

#2 2021-08-03 15:52:10

Thibaud222
Member
Registered: 2021-06-28
Posts: 23

Re: add user using api

https://  forum.glpi-project.org/viewtopic.php?id=170219
https://  forum.glpi-project.org/viewtopic.php?id=158012
Password with the encoding sha1?

Offline

#3 2021-08-03 17:15:55

aziz
Member
Registered: 2021-03-30
Posts: 109

Re: add user using api

Actually it was my fault I didn't encode the password to sha1 before sending the request thank you

But my problem now is when I add a user I set him to the default profile, what field to add to set the user to a specific profile.

Thanks in advance

Offline

#4 2021-08-04 09:01:55

Thibaud222
Member
Registered: 2021-06-28
Posts: 23

Re: add user using api

https:// github.com/glpi-project/glpi/blob/9.5/bugfixes/apirest.md#change-active-profile

Offline

Board footer

Powered by FluxBB