PHPackages                             coviu/coviu-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. coviu/coviu-sdk

ActiveLibrary[API Development](/categories/api)

coviu/coviu-sdk
===============

A simple library to use the Coviu API.

1.1.1(9y ago)3122.4k↓19.1%2MITPHPPHP &gt;=5.4.0

Since Jun 21Pushed 8y ago4 watchersCompare

[ Source](https://github.com/coviu/coviu-php-sdk)[ Packagist](https://packagist.org/packages/coviu/coviu-sdk)[ Docs](https://github.com/coviu/coviu-php-sdk)[ RSS](/packages/coviu-coviu-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (12)Used By (0)

coviu-php-sdk - Coviu api php client library
============================================

[](#coviu-php-sdk---coviu-api-php-client-library)

Coviu provides a session based API for creating and restricting access to coviu calls. The core concepts exposed are

- Session: A coviu call that occurs between two or more parties at a specified time, and has a finite duration.
- Participants: Users who may participate in a coviu call.

Participants join a call by following a *session link* in their browser, or mobile app. The *session link*identifies the participant, including their name, optional avatar, and importantly their *role*. As such, it is important that each person joining the call be issued a different *session link*, i.e. have a distinct *participant* created for them. A participant's *role* identifies whether that user may access the call directly, or if they are required the be *let in* by an existing participant.

coviu-php-sdk exposes this functionality through a convenient php library.

There is a demo for how to use the SDK at  . Also check out the Wordpress plugin at  which has a more detailed use.

### Installation

[](#installation)

```
composer require coviu/coviu-sdk
```

If you are not using composer in your application, still run the above command, which creates a `vendor` directory. Then commit the vendor directory into your codebase. You can get `composer` from  . You can check Coviu's composer package at  .

If you'd like to get a full tarball with the vendor directory, contact  .

### Quickstart

[](#quickstart)

Setup the sdk by passing in your api key and key secret

```
require_once __DIR__.'/vendor/autoload.php';
use coviu\Api\Coviu;

$api_key = 'my_api_key_from_coviu.com';
$api_key_secret = 'my_api_key_secret';

$coviu = new Coviu('api_key', 'key_secret');
```

Schedule a session for the future.

```
date_default_timezone_set('GMT');

$session = array(
  'session_name' => 'A test session with Dr. Who',
  'start_time' => (new \DateTime())->format(\DateTime::ATOM),
  'end_time' => (new \DateTime())->modify('+1 hour')->format(\DateTime::ATOM),
  'picture' => 'http://www.fillmurray.com/200/300'
);

$session = $coviu->sessions->createSession($session);
var_dump($session);
```

Example output

```
array(8) {
  ["team_id"]=>
  string(36) "bc5f47f1-f990-4d4d-a332-d3aa27ce6b76"
  ["client_id"]=>
  string(36) "440ee0f6-f99a-4515-ad15-da67dc29b0fc"
  ["participants"]=>
  array(0) {
  }
  ["session_id"]=>
  string(36) "6a157415-55cd-45a4-a82f-cd78b52e67b3"
  ["session_name"]=>
  string(27) "A test session with Dr. Who"
  ["start_time"]=>
  string(24) "2016-06-18T12:37:59.000Z"
  ["end_time"]=>
  string(24) "2016-06-18T13:37:59.000Z"
  ["picture"]=>
  string(33) "http://www.fillmurray.com/200/300"
}
```

`$coviu->sessions->*` is a collection of functions that build requests that can be run against the api.

You can now add a participant to the session

```
$host = array(
  'display_name' => 'Dr. Who',
  'role' => 'host', // or 'guest'
  'picture' => 'http://fillmurray.com/200/300',
  'state' => 'test-state'
);

$participant = $coviu->sessions->addParticipant($session['session_id'], $host);
var_dump($participant);
```

Example output

```
array(8) {
  ["client_id"]=>
  string(36) "440ee0f6-f99a-4515-ad15-da67dc29b0fc"
  ["display_name"]=>
  string(7) "Dr. Who"
  ["entry_url"]=>
  string(62) "https://coviu.com/session/af1f3606-dfbf-4728-b3ca-8f099ca9024a"
  ["participant_id"]=>
  string(36) "af1f3606-dfbf-4728-b3ca-8f099ca9024a"
  ["picture"]=>
  string(29) "http://fillmurray.com/200/300"
  ["role"]=>
  string(4) "HOST"
  ["session_id"]=>
  string(36) "6de7f062-f6db-4253-93b3-8f45445ce2d9"
  ["state"]=>
  string(10) "test-state"
}
```

Notice the `entry_url` for the newly created participant. Following this url in a browser or in one of the coviu mobile apps between `start_time` and `end_time` (while the session is active), will join the participant into the session, assuming the role and identity provided.

We can now read the entire session structure back

```
$sessions = $coviu->sessions->getSessions();

var_dump($sessions);

var_dump($coviu->$sessions->getSession($session['session_id']));
```

Example output

```
array(8) {
  ["team_id"]=>
  string(36) "bc5f47f1-f990-4d4d-a332-d3aa27ce6b76"
  ["client_id"]=>
  string(36) "440ee0f6-f99a-4515-ad15-da67dc29b0fc"
  ["participants"]=>
  array(1) {
    [0]=>
    array(8) {
      ["client_id"]=>
      string(36) "440ee0f6-f99a-4515-ad15-da67dc29b0fc"
      ["display_name"]=>
      string(7) "Dr. Who"
      ["entry_url"]=>
      string(62) "https://coviu.com/session/15142b66-7e26-4c49-a232-bc4aa1126aff"
      ["participant_id"]=>
      string(36) "15142b66-7e26-4c49-a232-bc4aa1126aff"
      ["picture"]=>
      string(29) "http://fillmurray.com/200/300"
      ["role"]=>
      string(4) "HOST"
      ["session_id"]=>
      string(36) "7ec15ff3-87f9-4ec9-9484-6029d5da56a6"
      ["state"]=>
      string(10) "test-state"
    }
  }
  ["session_id"]=>
  string(36) "7ec15ff3-87f9-4ec9-9484-6029d5da56a6"
  ["session_name"]=>
  string(27) "A test session with Dr. Who"
  ["start_time"]=>
  string(24) "2016-06-19T09:32:26.000Z"
  ["end_time"]=>
  string(24) "2016-06-19T10:32:26.000Z"
  ["picture"]=>
  string(33) "http://www.fillmurray.com/200/300"
}
```

There's a full set of api documents provided with api source for the `coviu-sdk-api` npm module at /src/SessionApi.php

OAuth2
======

[](#oauth2)

Coviu implements the OAuth2 authorization code flow . Coviu requires that you register you `redirect_url` ahead of time in `Applications` section of your api team account. Once a user has returned with a authorization code, you may recover the access token and refresh token by using the `authorizationCode`

```
$client = new Coviu($api_key, $key_secret);
$grant = $client->authorizationCode($code);

// Now create a client that acts on behalf of the user
$client2 = new Coviu($api_key, $key_secret, $grant);

// Get the team the user authorized you to access
$res2 = $client2->user-getAuthorizedTeam();

// Get that user's scheduled sessions
$res = $client2->sessions->getSessions();

```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 52.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 ~45 days

Total

5

Last Release

3437d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

1.0.2PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f385971bd0ba0a2edea5419e26fe36c296a8a1d1ba1b3f9a728239b7d3a6775f?d=identicon)[coviu](/maintainers/coviu)

---

Top Contributors

[![silviapfeiffer](https://avatars.githubusercontent.com/u/94913?v=4)](https://github.com/silviapfeiffer "silviapfeiffer (9 commits)")[![briely](https://avatars.githubusercontent.com/u/3443571?v=4)](https://github.com/briely "briely (6 commits)")[![BenjaminSchaaf](https://avatars.githubusercontent.com/u/2748981?v=4)](https://github.com/BenjaminSchaaf "BenjaminSchaaf (1 commits)")[![nathanoehlman](https://avatars.githubusercontent.com/u/297086?v=4)](https://github.com/nathanoehlman "nathanoehlman (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/coviu-coviu-sdk/health.svg)

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

###  Alternatives

[razorpay/razorpay

Razorpay PHP Client Library

2024.8M44](/packages/razorpay-razorpay)[pubnub/pubnub

This is the official PubNub PHP SDK repository.

1314.6M17](/packages/pubnub-pubnub)[culqi/culqi-php

Cliente Culqi API para PHP

41356.8k1](/packages/culqi-culqi-php)[ahmadawais/sendy-php-api

Sendy PHP API Wrapper: Complete API interfacing.

8673.5k](/packages/ahmadawais-sendy-php-api)[epayco/epayco-php

Epayco API client for PHP

25187.2k3](/packages/epayco-epayco-php)[yunchuang/appstore-connect-api

sdk for appstore connect api

3865.3k](/packages/yunchuang-appstore-connect-api)

PHPackages © 2026

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