Skip to main content

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": e
{
"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

@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.


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