PHPackages                             play-code-live/vkplay-live-sdk - 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. play-code-live/vkplay-live-sdk

ActiveLibrary[API Development](/categories/api)

play-code-live/vkplay-live-sdk
==============================

Access VKPlayLive API easily with PHP SDK

0.4.0(2y ago)6211MITPHPPHP &gt;=8.1.2

Since May 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/play-code-live/vkplay-live-sdk)[ Packagist](https://packagist.org/packages/play-code-live/vkplay-live-sdk)[ RSS](/packages/play-code-live-vkplay-live-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

VKPlayLive SDK
==============

[](#vkplaylive-sdk)

[![Latest Version](https://camo.githubusercontent.com/d556b2523c17f576110fba298bf176c942e2f77974d0dfe2fc5aba09ca3dc2f5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f706c61792d636f64652d6c6976652f766b706c61792d6c6976652d73646b2e7376673f7374796c653d666c61742d737175617265)](https://github.com/play-code-live/vkplay-live-sdk/releases)[![Maintainability](https://camo.githubusercontent.com/f3edf9ccce18cd982761443ad0fff78d57b7b928c622c10b59eb369405e880a2/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f61653434613865353036356330623238623063622f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/play-code-live/vkplay-live-sdk/maintainability)[![Test Coverage](https://camo.githubusercontent.com/77780f03eb934095fd30e0f93ce6bde2c3d6db7dce905e6043a427e4a211337f/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f61653434613865353036356330623238623063622f746573745f636f766572616765)](https://codeclimate.com/github/play-code-live/vkplay-live-sdk/test_coverage)

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

[](#installation)

The recommended way to install VKPlayLiveSDK is through [Composer](https://getcomposer.org/).

```
composer require play-code-live/vkplay-live-sdk
```

Authorization
-------------

[](#authorization)

```
use PlayCode\VKPlayLiveSDK\Client;
use PlayCode\VKPlayLiveSDK\Scope;
use PlayCode\VKPlayLiveSDK\Request\RevokeRequest;

[
    $clientId,
    $clientSecret,
    $redirectUri
] = ['...', '...', '...'];

// Initialize the client
$client = new Client($clientId, $clientSecret);

// Get auth link
$authLink = $client->getAuthLink($redirectUri, [
    Scope::CHANNEL_POINTS,
    Scope::CHANNEL_ROLES,
]);

// We'll get Code form the URL query parameter `?code`
$code = '...';

// Get token data
$tokenData = $client->getAccessToken($code, $redirectUri);
print("Access token: " . $tokenData->accessToken);
print("Refresh token: " . $tokenData->refreshToken);
print("Expires in: " . $tokenData->expiresIn);

// Refresh token
$tokenData = $client->refreshToken($tokenData->refreshToken);

// Revoke token
$client->revokeToken($tokenData->accessToken);
// or
$client->revokeToken($tokenData->refreshToken, RevokeRequest::HINT_REFRESH_TOKEN);
```

Methods
-------

[](#methods)

### Catalog

[](#catalog)

#### Channels Online

[](#channels-online)

```
// Limit is required and cannot be more than 200
$client->listChannelsOnline(limit: 20);

// You can specify category id
$client->listChannelsOnline(20, categoryId: '4588a9f0-b606-4827-9b6a-f2da4309c196');

// Or category type
$client->listChannelsOnline(20, categoryType: Category::TYPE_GAME);

// It works with clientId and clientSecret, but you can use access_token
$client->listChannelsOnline(20, accessToken: $tokenData->accessToken);
```

#### Categories Online

[](#categories-online)

```
// Limit is required and cannot be more than 200
$client->listCategoriesOnline(limit: 20);

// You can specify category type
$client->listCategoriesOnline(20, categoryType: Category::TYPE_GAME);

// It works with clientId and clientSecret, but you can use access_token
$client->listCategoriesOnline(20, accessToken: $tokenData->accessToken);
```

### Category

[](#category)

```
$category = $client->getCategory('3c6b4b27-75f2-49c4-b967-f15aa88e2038');
// or
$category = $client->getCategory('3c6b4b27-75f2-49c4-b967-f15aa88e2038', $tokenData->accessToken);

// Title of the category
$category->title;

// Image url
$category->coverUrl;

// Type of category. @see Category::class
$category->type;
```

### Category Search

[](#category-search)

```
$category = $client->searchCategory('Говорим и смотрим', limit: 20);
// or
$category = $client->searchCategory('Говорим и смотрим', limit: 20, accessToken: $tokenData->accessToken);
```

### Channel

[](#channel)

```
// You can get channel data with clientId and clientSecret
$channelInfo = $client->getChannel('play_code');

// Or with access_token
$channelInfo = $client->getChannel('play_code', $tokenData->accessToken);

// It contains all the data about channel. Example:
$channelInfo->channelInfo->subscribers; // Followers count
$channelInfo->channelInfo->status; // Current status

// Socket addresses
$channelInfo->channelInfo->webSocketChannels->chat;

// Owner info
$channelInfo->owner->avatarUrl;
$channelInfo->owner->nick;
$channelInfo->owner->isVerifiedStreamer;

// Stream info
$channelInfo->streamInfo->title;
$channelInfo->streamInfo->category->title;
$channelInfo->streamInfo->counters->viewers;
```

### Channels

[](#channels)

```
// In the same way you can fetch up to 100 channels
$channels = $client->getChannels([
    'play_code',
    'vkplay',
    'murmoshow',
]);

// Or with access_token
$channels = $client->getChannels([
    'play_code',
    'vkplay',
    'murmoshow',
], $tokenData->accessToken);
```

### Channel Credentials

[](#channel-credentials)

```
$credentials = $client->getChannelCredentials('play_code', $tokenData->accessToken);

// RTMP-stream url
$credentials->url;

// Stream token
$credentials->token;
```

License
-------

[](#license)

VKPlayLiveSDK is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

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

Total

4

Last Release

735d ago

PHP version history (2 changes)0.1PHP &gt;=8.0

0.4.0PHP &gt;=8.1.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/01b3de0f7fa2482a8d95a71861731621b9f8f6175a1a3ff469101c12c4dee516?d=identicon)[he110\_todd](/maintainers/he110_todd)

---

Top Contributors

[![he110](https://avatars.githubusercontent.com/u/5120133?v=4)](https://github.com/he110 "he110 (38 commits)")

---

Tags

apiphpsdkstreamingvkplayliveapisdkstreamingvkplayvkplaylive

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/play-code-live-vkplay-live-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/play-code-live-vkplay-live-sdk/health.svg)](https://phpackages.com/packages/play-code-live-vkplay-live-sdk)
```

###  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)[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M467](/packages/saloonphp-saloon)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M23](/packages/php-opencloud-openstack)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)

PHPackages © 2026

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