PHPackages                             vladkens/vk - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. vladkens/vk

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

vladkens/vk
===========

The PHP class for vk.com API with support OAuth.

v0.1.9(10y ago)213115.3k↓28.2%87[8 issues](https://github.com/vladkens/VK/issues)4MITPHPPHP &gt;=5.3.0

Since Oct 8Pushed 10y ago28 watchersCompare

[ Source](https://github.com/vladkens/VK)[ Packagist](https://packagist.org/packages/vladkens/vk)[ RSS](/packages/vladkens-vk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (5)Used By (4)

VK
==

[](#vk)

По-русски
---------

[](#по-русски)

Класс реализует VK API и авторизацию по OAuth протоколу. По всем вопросам можно писать на

### Использование

[](#использование)

1. Подключите класс

    ```
     require('VK.php');

    ```
2. Создайте объект VK

    1. без авторизации

        ```
         $vk = new VK\VK('{APP_ID}', '{API_SECRET}');

        ```
    2. с авторизацией

        ```
         $vk = new VK\VK('{APP_ID}', '{API_SECRET}', '{ACCESS_TOKEN}');

        ```
3. Если нужна авторизация

    1. Получаем ссылку авторизации

        ```
         $vk->getAuthorizeURL('{API_SETTINGS}', '{CALLBACK_URL}');

        ```
    2. Получаем токен доступа по ключу из ссылки авторизации

        ```
         $vk->getAccessToken('{CODE}');

        ```
    3. Проверить авторизирован ли пользователь

        ```
         $vk->isAuth(); // return bool

        ```
4. Используем API

    ```
     $vk->api('{METHOD_NAME}', '{PARAMETERS}');

    ```

### Другие методы

[](#другие-методы)

- Установить версию API. `$vk->setApiVersion({NUBMER});`

### Переменные

[](#переменные)

- `{APP_ID}` — ID приложения вконтакте.
- `{API_SECRET}` — Секретный код приложения.
- `{ACCESS_TOKEN}` — Токен доступа.
- `{API_SETTINGS}` — Запрашиваемые [права доступа](http://vk.com/developers.php?oid=-1&p=%D0%9F%D1%80%D0%B0%D0%B2%D0%B0_%D0%B4%D0%BE%D1%81%D1%82%D1%83%D0%BF%D0%B0_%D0%BF%D1%80%D0%B8%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%B8%D0%B9) приложения (через запятую).
- `{CALLBACK_URL}` — Адрес, на который будет передан `{CODE}`.
- `{CODE}` — Код для получения токена доступа.
- `{METHOD_NAME}` — Имя API метода. [Все методы](http://vk.com/developers.php?oid=-1&p=%D0%9E%D0%BF%D0%B8%D1%81%D0%B0%D0%BD%D0%B8%D0%B5_%D0%BC%D0%B5%D1%82%D0%BE%D0%B4%D0%BE%D0%B2_API).
- `{PARAMETERS}` — Параметры соответствующего метода API.

\* Если нужно получить бесконечный токен, используете параметр `offline` в `{API_SETTINGS}`.

### Лицензия

[](#лицензия)

[MIT](https://raw.github.com/vladkens/VK/master/LICENSE)

English
-------

[](#english)

The PHP class for vk.com API and to support OAuth. You can ask me any questions by e-mail:

### Use

[](#use)

1. Connect class

    ```
     require('VK.php');

    ```
2. Create VK object

    1. without authorization

        ```
         $vk = new VK\VK('{APP_ID}', '{API_SECRET}');

        ```
    2. with authorization

        ```
         $vk = new VK\VK('{APP_ID}', '{API_SECRET}', '{ACCESS_TOKEN}');

        ```
3. If need authorization

    1. Get authoriz link

        ```
         $vk->getAuthorizeURL('{API_SETTINGS}', '{CALLBACK_URL}');

        ```
    2. Get the token access by code from the authoriz link

        ```
         $vk->getAccessToken('{CODE}');

        ```
    3. Check the status of authorization

        ```
         $vk->isAuth(); // return bool

        ```
4. Usage API

    ```
     $vk->api('{METHOD_NAME}', '{PARAMETERS}');

    ```

### Other methods

[](#other-methods)

- Set version of API. `$vk->setApiVersion({NUBMER});`

### Variables

[](#variables)

- `{APP_ID}` — Your application's identifier.
- `{API_SECRET}` — Secret application key.
- `{ACCESS_TOKEN}` — Access token.
- `{API_SETTINGS}` — Access [rights requested](http://vk.com/developers.php?oid=-17680044&p=Application_Access_Rights) by your app (through comma).
- `{CALLBACK_URL}` — Address to which `{CODE}` will be rendered.
- `{CODE}` — The code to get access token.
- `{METHOD_NAME}` — Name of the API method. [All methods.](http://vk.com/developers.php?oid=-17680044&p=API_Method_Description)
- `{PARAMETERS}` — Parameters of the corresponding API methods.

\* If you need infinite token use key `offline` in `{API_SETTINGS}`.

### License

[](#license)

[MIT](https://raw.github.com/vladkens/VK/master/LICENSE)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~220 days

Total

4

Last Release

3942d ago

### Community

Maintainers

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

---

Top Contributors

[![corpsee](https://avatars.githubusercontent.com/u/1416706?v=4)](https://github.com/corpsee "corpsee (4 commits)")[![chmac](https://avatars.githubusercontent.com/u/690997?v=4)](https://github.com/chmac "chmac (1 commits)")[![exileed](https://avatars.githubusercontent.com/u/942898?v=4)](https://github.com/exileed "exileed (1 commits)")[![Paaashka](https://avatars.githubusercontent.com/u/250312?v=4)](https://github.com/Paaashka "Paaashka (1 commits)")[![sanasol](https://avatars.githubusercontent.com/u/1709666?v=4)](https://github.com/sanasol "sanasol (1 commits)")[![Tantacula](https://avatars.githubusercontent.com/u/1346989?v=4)](https://github.com/Tantacula "Tantacula (1 commits)")

---

Tags

apioauthvkvk.com

### Embed Badge

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

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

###  Alternatives

[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.6k136.0M248](/packages/league-oauth2-server)[auth0/auth0-php

PHP SDK for Auth0 Authentication and Management APIs.

40820.2M68](/packages/auth0-auth0-php)[auth0/symfony

Symfony SDK for Auth0 Authentication and Management APIs.

128738.1k](/packages/auth0-symfony)[bocharsky-bw/vkontakte-php-sdk

Vkontakte PHP SDK

3259.2k1](/packages/bocharsky-bw-vkontakte-php-sdk)[mollie/oauth2-mollie-php

Mollie Provider for OAuth 2.0 Client

251.7M1](/packages/mollie-oauth2-mollie-php)[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)
