incudata-loghy / loghy-php
Loghy PHP SDK.
Installs: 8 278
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Requires
- php: ^8.0
- friendsofphp/php-cs-fixer: ^3.4
- guzzlehttp/guzzle: ^7.4
Requires (Dev)
- pestphp/pest: ^1.21
- phpstan/phpstan: ^1.6
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}');