PHPackages                             graze/gigya-client - 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. graze/gigya-client

ActiveLibrary[API Development](/categories/api)

graze/gigya-client
==================

REST Client for Gigya API

2.0.2(6y ago)598.6k7[2 PRs](https://github.com/graze/gigya-client/pulls)MITPHPPHP ^5.5|^7.0

Since Oct 7Pushed 3y ago9 watchersCompare

[ Source](https://github.com/graze/gigya-client)[ Packagist](https://packagist.org/packages/graze/gigya-client)[ Docs](https://github.com/graze/gigya-client)[ RSS](/packages/graze-gigya-client/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (8)Dependencies (7)Versions (14)Used By (0)

gigya-client
============

[](#gigya-client)

[![](https://camo.githubusercontent.com/0ba253f7c66da7fe9a741eb9bb81b461c4fe37ccf19bc85ea75d7cdb9af8ddc4/687474703a2f2f7374756666706f696e742e636f6d2f66616d696c792d6775792f696d6167652f31353239382d66616d696c792d6775792d676967676564792e676966)](https://camo.githubusercontent.com/0ba253f7c66da7fe9a741eb9bb81b461c4fe37ccf19bc85ea75d7cdb9af8ddc4/687474703a2f2f7374756666706f696e742e636f6d2f66616d696c792d6775792f696d6167652f31353239382d66616d696c792d6775792d676967676564792e676966)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8345f6fab6dbec76b13bd6883c3618b4be1e2233b0ed328d0af9535a706c88ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6772617a652f67696779612d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graze/gigya-client)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/e120a6e81c53480796f0f8dda5dbabed832436c518f9c91f30c30b74d5c23d3a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6772617a652f67696779612d636c69656e742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/graze/gigya-client)[![Total Downloads](https://camo.githubusercontent.com/48b5696d48f99e85e230d789290dee8bbae5a5c4dab8a7a690656b861c87b30a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6772617a652f67696779612d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graze/gigya-client)[![Coverage Status](https://camo.githubusercontent.com/6fd1c409acd5ae8cc8c932b1fd145d05d600bc64f034b3f6cbe5a666bbc9c72f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6772617a652f67696779612d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/graze/gigya-client/code-structure)[![Quality Score](https://camo.githubusercontent.com/5d95cfafac691dcfebb0ca38a4e5fb930cde064f56e6412ebf7ba74f83ff2765/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6772617a652f67696779612d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/graze/gigya-client)

Client for Gigya's REST API

- Endpoint call hierarchy: `$gigya->accounts()->tfa()->getCertificate()`
- List of endpoints: `accounts`, `accounts->tfa`, `audit`, `socialize`, `comments`, `gameMechanics`, `reports`, `dataStore`, `identityStorage`, `saml`, `saml->idp`
- Populated classes with auto completion helpers for the available methods from Gigya
- Different authentication methods:
    - `gigya`: add `api_key` and `secret` to https web requests
    - `credentials`: uses `client_id` and `client_secret` for use with oauth2 token retrieval
    - `gigya-oauth2`: uses an automatically retrieved OAuth2 token
    - `custom`: use your own custom authentication (or use oauth2 with a provided token)

Install
-------

[](#install)

The simplest way to install the client is with composer and running:

```
$ composer require graze/gigya-client
```

Usage
-----

[](#usage)

By Default the Gigya client uses `gigya` auth and appends the api\_key and secret onto the query string when calling gigya over https.

```
$gigya = new Gigya($key, $secret);

$response = $gigya->accounts()->getAccountInfo(['uid' => $uid]);
if ($response->getErrorCode() === ErrorCode::OK) {
    $account = $response->getData();
}
```

### OAuth 2

[](#oauth-2)

You can also use `oauth2` in server mode and retrieve information about all accounts

```
$gigya = new Gigya($key, $secret, $region, $user, ['auth'=>'gigya-oauth2']);
$response = $gigya->accounts()->getAccountInfo(['uid' => $uid]);
$account = $response->getData();
```

#### Social OAuth 2

[](#social-oauth-2)

OAuth2 can also be used to retrieve information about a single account without knowledge of the `uid`.

```
$grant = new ManualGrant();
$gigya = new Gigya($key, $secret, $region, null, ['auth' => 'oauth2-custom']);
$gigya->addHandler(OAuth2Subscriber::middleware($grant, 'oauth2-custom'));

$tokenResponse = $gigya->socialize()->getToken([
    'grant_type' => 'code',
    'authorization_code' => '',
    'redirect_uri' => '',
], ['auth' => 'credentials']);

$grant->setToken($tokenResponse->getData()->get('access_token'));

$response = $gigya->accounts()->getAccountInfo();
$account = $response->getData();
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ make install
$ make test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email [security@graze.com](security@graze.com) instead of using the issue tracker.

Credits
-------

[](#credits)

- [Harry Bragg](https://github.com/h-bragg)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~209 days

Recently: every ~303 days

Total

9

Last Release

2238d ago

Major Versions

v0.2.1 → v1.0.0-rc12016-12-01

v1.0.0 → v2.0.02017-10-17

PHP version history (3 changes)v0.1.0PHP &gt;=5.5.0

v2.0.0PHP &gt;=5.5.0|^7.0

2.0.2PHP ^5.5|^7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/637788?v=4)[graze.com](/maintainers/graze)[@graze](https://github.com/graze)

---

Top Contributors

[![biggianteye](https://avatars.githubusercontent.com/u/1482649?v=4)](https://github.com/biggianteye "biggianteye (2 commits)")[![adragus-inviqa](https://avatars.githubusercontent.com/u/13104649?v=4)](https://github.com/adragus-inviqa "adragus-inviqa (1 commits)")[![steffenbrand](https://avatars.githubusercontent.com/u/5013806?v=4)](https://github.com/steffenbrand "steffenbrand (1 commits)")

---

Tags

api-clientgigya-clientphpgrazegigyagigya-client

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/graze-gigya-client/health.svg)

```
[![Health](https://phpackages.com/badges/graze-gigya-client/health.svg)](https://phpackages.com/packages/graze-gigya-client)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.1k1](/packages/jasara-php-amzn-selling-partner-api)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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