PHPackages                             labile/vk-utils - 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. labile/vk-utils

ActiveLibrary[API Development](/categories/api)

labile/vk-utils
===============

PHP Utils for vk.com API

2.1.4(3y ago)13301BSD-3-ClausePHPPHP &gt;=7.4CI passing

Since Dec 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/labi-le/vk-utils)[ Packagist](https://packagist.org/packages/labile/vk-utils)[ RSS](/packages/labile-vk-utils/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (1)Dependencies (2)Versions (4)Used By (1)

vk-utils
========

[](#vk-utils)

[![GitHub license](https://camo.githubusercontent.com/915f87e956ba1ba46b605760796f97aaf2af77b571424e3a0cb4566f9bd9ee9d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4253442d677265656e2e737667)](https://github.com/labi-le/vk-utils/blob/main/LICENSE)[![Packagist Stars](https://camo.githubusercontent.com/90aada370c10bdef0d13fdebdc5bdf19697d5376392b63eadabe840962e4b82e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f6c6162696c652f766b2d7574696c73)](https://packagist.org/packages/labile/vk-utils/stats)[![Packagist Stats](https://camo.githubusercontent.com/0744de9a16e82480b3af2866f5fe520e637e560dbbf30108ba4171cc3363e709/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6162696c652f766b2d7574696c73)](https://packagist.org/packages/labile/vk-utils/stats)

[Документация на русском языке](README_RU.md)

Installation
------------

[](#installation)

`composer require labile/vk-utils`

How to use it?
--------------

[](#how-to-use-it)

### Simple request

[](#simple-request)

```
use Astaroth\VkUtils\Client;

$api = new Client;

$response = $api->request('wall.get', ['owner_id' => 1]);
```

### Use Request class

[](#use-request-class)

```
use Astaroth\VkUtils\Client;
use Astaroth\VkUtils\Requests\Request;

$api = new Client;

$request = new Request('wall.get', ['owner_id' => 1]);
$response = $api->send($request);
```

### Use ExecuteRequest class

[](#use-executerequest-class)

Sending multiple requests at the same time

```
use Astaroth\VkUtils\Execute;
use Astaroth\VkUtils\Requests\Request;

$api = new Execute;
$api->setDefaultToken('PUT ACCESS TOKEN');
$execute = [
    new Request('wall.get', ['owner_id' => 1]),
    new Request('wall.get', ['owner_id' => 2]),
    // ...more request
    new Request('wall.get', ['owner_id' => 25]),
    ];

$response = $api->send($execute);
```

### Using the required api version

[](#using-the-required-api-version)

```
use Astaroth\VkUtils\Client;

$api = new Client('5.131');
```

### Using a token for requests

[](#using-a-token-for-requests)

Set default token in client

```
use Astaroth\VkUtils\Client;

$api = new Client();

$api->setDefaultToken("PUT TOKEN");
```

or so

```
use Astaroth\VkUtils\Requests\Request;
use Astaroth\VkUtils\Client;

$api = new Client;

// The token in the request takes precedence over setDefaultToken
$request = new Request('wall.get', ['owner_id' => 1], "some_token");
```

### Constructors

[](#constructors)

#### Attachment upload constructor

[](#attachment-upload-constructor)

```
use Astaroth\VkUtils\Builders\Attachments\Message\Graffiti;
use Astaroth\VkUtils\Builders\Attachments\Photo;
use Astaroth\VkUtils\Builders\Attachments\Video;
use Astaroth\VkUtils\Uploader;
use Astaroth\VkUtils\Builders\Attachments\Message\AudioMessage;

$uploader = new Uploader();
$uploader->setDefaultToken('PUT TOKEN');

$attachments = $uploader->upload
(
    new Photo("dog.jpg"),

    new AudioMessage('meow.mp3'),

    //downloading from the link temporarily does not work
    (new Video('https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4'))
        ->setName('4 Biggers Escapes')
        ->setDescription('The video has nothing interesting, just an example')
        ->setWallpost(true),

    new Graffiti('cat.png')
);
```

#### Builder

[](#builder)

```
use Astaroth\VkUtils\Builders;
use Astaroth\VkUtils\Builders\Message;
use Astaroth\VkUtils\Builders\Post;

$token = 'PUT TOKEN';

$builder = new \Astaroth\VkUtils\Builder();

$builders[] = (new Message)
    ->setMessage("hi me name is lola! im lol")
    ->setPeerId(418618);

$builders[] = (new Post)
    ->setMessage("hello subscribers")

$response = $builder->create(...$builders)
);
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~91 days

Total

3

Last Release

1415d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25be68812397021842e1ed2d3bc1cc44fb0ac0cb861d609bdc33d908b10e2c81?d=identicon)[labile](/maintainers/labile)

---

Top Contributors

[![labi-le](https://avatars.githubusercontent.com/u/65619560?v=4)](https://github.com/labi-le "labi-le (17 commits)")

---

Tags

phpvkvkapiphpapiclientvkvk.comvkontaktevk-utilsvk-utilites

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/labile-vk-utils/health.svg)

```
[![Health](https://phpackages.com/badges/labile-vk-utils/health.svg)](https://phpackages.com/packages/labile-vk-utils)
```

###  Alternatives

[kunalvarma05/dropbox-php-sdk

Dropbox PHP API V2 SDK (Unofficial)

3633.0M18](/packages/kunalvarma05-dropbox-php-sdk)[getjump/vk

Library for work with API Vk.com

19948.5k](/packages/getjump-vk)[digitalstars/simplevk

Powerful PHP library/framework for VK API bots, supporting LongPoll &amp; Callback &amp; OAuth

883.9k3](/packages/digitalstars-simplevk)

PHPackages © 2026

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