README

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.

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.

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

OAuth2

Coviu implements the OAuth2 authorization code flow https://tools.ietf.org/html/rfc6749#section-4.1. 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();