progdog-ru/avito_auth

1.0.1 2022-04-07 12:44 UTC

This package is auto-updated.

Last update: 2025-04-07 19:52:35 UTC


README

Получение и обновление авторизационных токенов для персональной авторизации и авторизации приложений Авито API для бизнеса предоставляется согласно Условиям использования.

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 1
  • Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer:

composer require progdog-ru/avito_auth

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Swagger\Client\Api\AccessApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$client_id = "client_id_example"; // string | 
$client_secret = "client_secret_example"; // string | 
$grant_type = "grant_type_example"; // string | 

try {
    $result = $apiInstance->getAccessToken($client_id, $client_secret, $grant_type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessApi->getAccessToken: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to https://api.avito.ru/

Class Method HTTP request Description
AccessApi getAccessToken POST /token Получение access token
ApplicationAccessApi getAccessTokenAuthorizationCode POST /token‎ Получение access token
ApplicationAccessApi refreshAccessTokenAuthorizationCode POST /token‎‎ Обновление access token

Documentation For Models

Documentation For Authorization

AuthorizationCode

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://avito.ru/oauth
  • Scopes:
  • autoload:reports: Получение отчетов Автозагрузки
  • items:apply_vas: Применение дополнительных услуг
  • items:info: Получение информации об объявлениях
  • job:cv: Получение информации резюме
  • job:negotiations: Получение информации об откликах на вакансии
  • job:vacancy: Работа с вакансиями
  • job:write: Изменение объявлений вертикали Работа
  • messenger:read: Чтение сообщений в мессенджере Авито
  • messenger:write: Модифицирование сообщений в мессенджере Авито
  • short_term_rent:read: Получение информации об объявлениях краткосрочной аренды
  • short_term_rent:write: Изменение объявлений краткосрочной аренды
  • stats:read: Получение статистики объявлений
  • user:read: Получение информации о пользователе
  • user_balance:read: Получение баланса пользователя
  • user_operations:read: Получение истории операций пользователя

ClientCredentials

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:

Author

supportautoload@avito.ru