PHP code example of rwe-devs / esocial-api-connector

1. Go to this page and download the library: Download rwe-devs/esocial-api-connector library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rwe-devs / esocial-api-connector example snippets


use RweDevs\EsocialApiConnector\Esocial\EsocialConnector;

$connector = new EsocialEsocialConnector($apiUrl, $token);

use RweDevs\EsocialApiConnector\DTO\LoginDTO;

$loginDTO = new LoginDTO('[email protected]', '12345678');

use RweDevs\EsocialApiConnector\Esocial\Requests\LoginRequest;

$login = new LoginRequest($loginDTO);
$response = $connector->send($login);