incudata-loghy/loghy-php

There is no license information available for the latest version (2.1.0) of this package.

Loghy PHP SDK.

2.1.0 2022-09-16 14:25 UTC

This package is auto-updated.

Last update: 2024-05-16 18:08:33 UTC


README

Usage

Installation

$ composer require incudata-loghy/loghy-php

SDK Initialization

<?php
use Loghy\SDK\Loghy;

$loghy = new Loghy('{YOUR_SITE_CODE}');

Get authenticated user from authorization code

<?php

$user = $loghy->user($code);

$loghyId = $user->getLoghyId();
$name    = $user->getName();
$email   = $user->getEmail();

Set the user ID issued by your sites to Loghy ID

$loghy->putUserId('{YOUR_USER_ID}', '{YOUR_LOGHY_ID}');