19 lines
497 B
PHP
19 lines
497 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
use AmoCRM\Client\AmoCRMApiClient;
|
||
|
|
use Symfony\Component\Dotenv\Dotenv;
|
||
|
|
|
||
|
|
include_once __DIR__ . '/../vendor/autoload.php';
|
||
|
|
|
||
|
|
$dotenv = new Dotenv();
|
||
|
|
$dotenv->load(__DIR__ . '/.env.dist', __DIR__ . '/.env');
|
||
|
|
|
||
|
|
$clientId = $_ENV['CLIENT_ID'];
|
||
|
|
$clientSecret = $_ENV['CLIENT_SECRET'];
|
||
|
|
$redirectUri = $_ENV['CLIENT_REDIRECT_URI'];
|
||
|
|
|
||
|
|
$apiClient = new AmoCRMApiClient($clientId, $clientSecret, $redirectUri);
|
||
|
|
|
||
|
|
include_once __DIR__ . '/token_actions.php';
|
||
|
|
include_once __DIR__ . '/error_printer.php';
|