Best Answer

POST /manage/v1/user "You haven't filled in some mandatory fields"

  • 7 October 2021
  • 3 replies
  • 38 views

Hi, 

I am creating users via the API and it was working up until recently (not sure exactly when it stopped working). 

Now I am getting the following error:

{
"name": "Bad Request",
"message": [
{
"field": "userid",
"message": "You haven't filled in some mandatory fields"
}
],
"code": 1002,
"status": 400
}

This is the body that is being sent (data scrubbed):

{
"email": "test@Test.com",
"password": "password",
"firstname": "Test",
"lastname": "User",
"additional_fields": {
"8": "Test Field 8",
"9": "Test Field 9",
"15": "Test Field 15",
"18": "Test Field 18",
"22": "Test Field 22"
}
}

Before the userid, was not required for this end point? I thought that the userid was generated by docebo, upon user creation ? All the Mandatory fields for the additional fields are populated and valid, I have checked that already, just not sure if there was some other change.

 

Thanks,

 

Ben

icon

Best answer by alekwo 7 October 2021, 07:31

View original

3 replies

Userlevel 5
Badge +1

@bkiang there are quite a few inconsistencies in the naming of various things in Docebo’s API.

If I remember correctly (can’t check it right now) when creating a user you must provide the username (e.g. email address) in the “userid” filed. And then, the internal Docebo’s ID will be returned as the “id” field in the response.

Userlevel 5
Badge +1

And as per the API browser, it may be optional if you have enabled the option "Use Email as Username" in "Advanced Settings". Maybe someone changed this setting recently on your platform?

 

 

Thank you so much Alek! This is exactly what it was. Much Appreciated.

 

-Ben

Reply