PHP code example of progdog-ru / avito-rest-api-php

1. Go to this page and download the library: Download progdog-ru/avito-rest-api-php 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/ */

    

progdog-ru / avito-rest-api-php example snippets



Avito\RestApi\ApiClient;
use Avito\RestApi\Storage\FileStorage;

// API credentials from https://www.avito.ru/professionals/api
define('API_CLIENT_ID', '');
define('API_CLIENT_SECRET', '');
define('PATH_TO_ATTACH_FILE', __FILE__);

$AvitoApiClient = new ApiClient(API_CLIENT_ID, API_CLIENT_SECRET, new FileStorage());