<div dir="ltr"><span style="font-size:12.8000001907349px">-> $login = $client->doLogin('user', 'key');</span><br style="font-size:12.8000001907349px"><div><br></div><div>I think that here you need to insert vtiger username and accesskey. </div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-14 16:30 GMT+02:00 Christophe Humbert <span dir="ltr"><<a href="mailto:chrissc.humbert@gmail.com" target="_blank">chrissc.humbert@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello<br><br></div>I am trying to create a lead using webservice and vtwsclib but I have an error<br>INVALID_SESSIONID:Session Identifier provided is Invalid<br><br></div>Please find my code <br><br>Hello<br><br>Je fais tourner un web service<br>Resultat:<br><br><?php<br>$file = realpath('vtwsclib');<br>include_once $file.'/Vtiger/WSClient.php';<br>$url = '<a href="https://www.lib-assur.com/vtiger" target="_blank">https://www.lib-assur.com/vtiger</a>';<br>$client = new Vtiger_WSClient($url);<br>$login = $client->doLogin('user', 'key');<br>if(!$login) echo 'Login Failed';<br>else {<br>    $module = 'Leads';<br>    $record = $client->doCreate($module, Array('lastname'=>'Test_LS', 'company'=>'Test'));<br>    if($record) {<br>        $recordid = $client->getRecordId($record['id']);<br>        echo $recordid;<br>    } <br>    else {<br>        $wasError= $client->lastError();<br>        if($wasError) {<br>            echo "</br>last error : ".$wasError['code'] . ':' . $wasError['message'];<br>        }<br><br>    }<br>        <br>}<br>?><br><br></div>Thanks in advance<br></div>VTiger 6.2 <br><span class="HOEnZb"><font color="#888888"><br clear="all"><div><div><div><div><div><div><div>Christophe Humbert<br><br></div></div>
</div></div></div></div></div></font></span></div>
<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br></div>