<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML - vooraf opgemaakt Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.E-mailStijl17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.HTML-voorafopgemaaktChar
{mso-style-name:"HTML - vooraf opgemaakt Char";
mso-style-priority:99;
mso-style-link:"HTML - vooraf opgemaakt";
font-family:"Courier New";
mso-fareast-language:NL;}
.MsoChpDefault
{mso-style-type:export-only;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=NL link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal> Hello,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> With PHP i want to add an user to a single domain through the API.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> After succesfully authentication and obtained a session ID, I am sending the following data (with CURL);<o:p></o:p></p><p class=MsoNormal><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'> $data = json_encode(array(<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'> "firstname" => "Pietje",<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'> "lastname" => "Puk",<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'> "domain" => "xxxx.nl",<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'> "password" => "xxxxxx"<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'> "email" => "pietje.puk@xxxxx.nl"));<o:p></o:p></span></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> But i get the following response:<o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";mso-fareast-language:NL'><o:p> </o:p></span></p><pre style='margin-left:35.4pt'>Array<o:p></o:p></pre><pre style='margin-left:35.4pt'>(<o:p></o:p></pre><pre style='margin-left:35.4pt'> [status] => ERROR<o:p></o:p></pre><pre style='margin-left:35.4pt'> [code] => 34<o:p></o:p></pre><pre style='margin-left:35.4pt'> [reason] => No object type ID specified!<o:p></o:p></pre><pre style='margin-left:35.4pt'>)<o:p></o:p></pre><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";mso-fareast-language:NL'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";mso-fareast-language:NL'><o:p> </o:p></span></p><pre> [9] => Initizing cuRL: Resource id #12 URL:https://xxxxxxx.xxx/hosted-kolab/api/user.add<o:p></o:p></pre><pre> [10] => Sending headers: ["Content-Type: application\/json","Content-Length: 93","X-Session-Token: XXXXXXXXXXXXXXXXXXXXXXX"]<o:p></o:p></pre><pre> [11] => Result cURL: {"status":"ERROR","code":34,"reason":"No object type ID specified!"}<o:p></o:p></pre><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";mso-fareast-language:NL'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";mso-fareast-language:NL'><o:p> </o:p></span></p><p class=MsoNormal> Is there on the Internet an usuable example for creating new accounts with PHP via API of Kolab (yes i used google, but no luck)<o:p></o:p></p><p class=MsoNormal> Or can someone please help me out with this issue who has experience with creating users via the API (with PHP) ?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> Thanks!<o:p></o:p></p></div></body></html>