PHPackages                             happysanta/php-vk-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. happysanta/php-vk-api

ActiveLibrary[API Development](/categories/api)

happysanta/php-vk-api
=====================

Api client for vk.com

3.0.1(5y ago)05641MITPHPPHP &gt;=7.4.0

Since Dec 8Pushed 5y agoCompare

[ Source](https://github.com/HappySanta/php-vk-api)[ Packagist](https://packagist.org/packages/happysanta/php-vk-api)[ RSS](/packages/happysanta-php-vk-api/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (2)Dependencies (2)Versions (15)Used By (0)

VK API Client 1.2.2
===================

[](#vk-api-client-122)

Клиент для запросов к API Вконтакте

```
composer require stels-cs/php-vk-api
```

```
$response = \Vk\Executor::api("users.get", ["user_ids" => "6492,2050"]);
if ($response->isSuccess()) {
    $list = $response->getResponse();
        //$list = [
        //  [
        //      [id] => 6492
        //      [first_name] => Андрей
        //      [last_name] => Рогозов
        //  ],[
        //      [id] => 2050
        //      [first_name] => Катя
        //      [last_name] => Лебедева
        //  ]
        //]
} else {
    $code = $response->getCode(); //int
    $message = $response->getMessage(); //string
    $canRetry = $executor->canRetryLaterWithCode($code); //bool
    // if $canRetry == true it "soft" error like network error or vk is down
}
```

```
$appId = 43251123;
$appSecret = "AFwetrvasfawer";
$redirectUrl = "https://mysite.com/auth";
$code = "caefrvrtsvakmcaoer";

$response = \Vk\Executor::getAccessToken($appId, $appSecret, $redirectUrl, $code);
if ($response->isSuccess()) {
    $data = $response->getData();
    $accessToken = $data["access_token"];
    $expiresIn = $data["expires_in"];
    $userId = $data["user_id"];
} else {
    $code = $response->getCode(); //int
    $message = $response->getMessage(); //string
}
```

```
$executor = new \Vk\Executor();
$response = $executor->execute( new \Vk\ApiRequest('users.get', ['user_ids' => '6492,2050']) );
if ($response->isSuccess()) {
    $list = $response->getData();
    //$list = [
    //  [
    //      [id] => 6492
    //      [first_name] => Андрей
    //      [last_name] => Рогозов
    //  ],[
    //      [id] => 2050
    //      [first_name] => Катя
    //      [last_name] => Лебедева
    //  ]
    //]
} else {
    $code = $response->getCode(); //int
    $message = $response->getMessage(); //string
    $canRetry = $executor->canRetryLaterWithCode($code); //bool
    // if $canRetry == true it "soft" error like network error or vk is down
}
```

Загрузка изображения для виджета с использоватеним токена сообщества

```
$token = "270b2d972f25cc0a7893.....26eb44957c610ed1402725a5a2ae3";
$uploader = new \Vk\GroupImageUploader($token);
$file = "/Users/i.nedzvetskiy/Downloads/xUvX2Ktzu18.jpg";
$id = $uploader->uploadImage($file); //$id можно использтвать в коде виджета
$url = $uploader->getImageUrl($id, "50x50"); //Так можно получать url картинки
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~96 days

Recently: every ~87 days

Total

13

Last Release

1926d ago

Major Versions

1.2.4 → 2.1.12020-10-30

2.2.0 → 3.0.02021-02-04

PHP version history (3 changes)1.0.0PHP &gt;=7.0.0

1.2.4PHP &gt;=7.2.0

3.0.0PHP &gt;=7.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/bb136dd961eaa1cf56b73430f6003381ab5bbe02cf81d2b9677e8671f9039195?d=identicon)[stels-cs](/maintainers/stels-cs)

![](https://avatars.githubusercontent.com/u/8438047?v=4)[captaintea](/maintainers/captaintea)[@captaintea](https://github.com/captaintea)

---

Top Contributors

[![stels-cs](https://avatars.githubusercontent.com/u/8437497?v=4)](https://github.com/stels-cs "stels-cs (16 commits)")[![captaintea](https://avatars.githubusercontent.com/u/8438047?v=4)](https://github.com/captaintea "captaintea (1 commits)")[![frnti](https://avatars.githubusercontent.com/u/46242746?v=4)](https://github.com/frnti "frnti (1 commits)")

---

Tags

apivkvk.com

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/happysanta-php-vk-api/health.svg)

```
[![Health](https://phpackages.com/badges/happysanta-php-vk-api/health.svg)](https://phpackages.com/packages/happysanta-php-vk-api)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[getjump/vk

Library for work with API Vk.com

19948.5k](/packages/getjump-vk)[asil/vkmarket

The PHP library for work with VK Market API

235.1k](/packages/asil-vkmarket)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
