[Vtigercrm-developers] Create a Lead in Web service using vtwsclib 1.5

Matteo Baranzoni info at greenbitweb.com
Mon Jun 15 15:54:46 GMT 2015


I suppose that is not script problem:
http://s1.postimg.org/sqmz0kikv/Selezione_004.png
I change only url (http, not https), user and access key

2015-06-15 17:02 GMT+02:00 Christophe Humbert <chrissc.humbert at gmail.com>:

> Hello
>
> Anyone has an idea...it is quite urgent...
>
> Thanks a lot
>
> Christophe Humbert
>
>
>
> On Sun, Jun 14, 2015 at 5:47 PM, Christophe Humbert <
> chrissc.humbert at gmail.com> wrote:
>
>> Hello Matteo
>>
>> Yes I know....I just did want to post my user and key....
>>
>> The login works because I don have login failed echoed
>>
>> Thanks
>>
>> Christophe Humbert
>>
>>
>>
>> On Sun, Jun 14, 2015 at 5:38 PM, Matteo Baranzoni <info at greenbitweb.com>
>> wrote:
>>
>>> -> $login = $client->doLogin('user', 'key');
>>>
>>> I think that here you need to insert vtiger username and accesskey.
>>>
>>> 2015-06-14 16:30 GMT+02:00 Christophe Humbert <chrissc.humbert at gmail.com
>>> >:
>>>
>>>> Hello
>>>>
>>>> I am trying to create a lead using webservice and vtwsclib but I have
>>>> an error
>>>> INVALID_SESSIONID:Session Identifier provided is Invalid
>>>>
>>>> Please find my code
>>>>
>>>> Hello
>>>>
>>>> Je fais tourner un web service
>>>> Resultat:
>>>>
>>>> <?php
>>>> $file = realpath('vtwsclib');
>>>> include_once $file.'/Vtiger/WSClient.php';
>>>> $url = 'https://www.lib-assur.com/vtiger';
>>>> $client = new Vtiger_WSClient($url);
>>>> $login = $client->doLogin('user', 'key');
>>>> if(!$login) echo 'Login Failed';
>>>> else {
>>>>     $module = 'Leads';
>>>>     $record = $client->doCreate($module, Array('lastname'=>'Test_LS',
>>>> 'company'=>'Test'));
>>>>     if($record) {
>>>>         $recordid = $client->getRecordId($record['id']);
>>>>         echo $recordid;
>>>>     }
>>>>     else {
>>>>         $wasError= $client->lastError();
>>>>         if($wasError) {
>>>>             echo "</br>last error : ".$wasError['code'] . ':' .
>>>> $wasError['message'];
>>>>         }
>>>>
>>>>     }
>>>>
>>>> }
>>>> ?>
>>>>
>>>> Thanks in advance
>>>> VTiger 6.2
>>>>
>>>> Christophe Humbert
>>>>
>>>>
>>>> _______________________________________________
>>>> http://www.vtiger.com/
>>>>
>>>
>>>
>>> _______________________________________________
>>> http://www.vtiger.com/
>>>
>>
>>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150615/004bed12/attachment.html>


More information about the vtigercrm-developers mailing list