How can I resolve the: The session ID is invalid error on Community Edition

How can I resolve the problem with: {"name":"Invalid Session ID","number":11,"description":"The session ID is invalid"}, this is the API answer from SugarCRM Community Edition 6.1.7 (Build 5875). 

I am trying to create a LEAD from Magento 2 on a local environment with windows 10 and MySql database, I am using the http://<my_sugarcrm_server>/service/v2_1/rest.php url API. I get a Session ID from the native CALL function specified in the sugar 6.5 developer guide. But, the error always shows when I try create a LEAD. And Lori Arce, I have executed Quick Repair and Rebuild Relationships but, even so, I keep the session ID is invalid error. My sugarcrm environment is on SQL SERVER database and Windows Server 2008 R2 server (OS).

Please, anyone helps me.

I am sorry, Magento 2 runs on PHP programmer language. So, I am doing a PHP REST API. 

Thanks a lot. 

Kind Regards.