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

ActiveLibrary[API Development](/categories/api)

gigya/php-sdk
=============

PHP SDK for Gigya

3.0.9(4mo ago)9481.5k↓35.7%15[2 issues](https://github.com/SAP/gigya-php-sdk/issues)[5 PRs](https://github.com/SAP/gigya-php-sdk/pulls)3Apache-2.0PHPPHP &gt;=8.0CI failing

Since Jun 4Pushed 2mo ago7 watchersCompare

[ Source](https://github.com/SAP/gigya-php-sdk)[ Packagist](https://packagist.org/packages/gigya/php-sdk)[ RSS](/packages/gigya-php-sdk/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (4)Versions (22)Used By (3)

PHP SDK
=======

[](#php-sdk)

[Learn more](https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/4168a6ba70b21014bbc5a10ce4041860.html)

Description
-----------

[](#description)

The PHP SDK provides a PHP interface for the Gigya API. The library makes it simple to integrate Gigya services in your PHP application.

Requirements
------------

[](#requirements)

[PHP 8.0.x, PHP 8.1.x, PHP 8.2.x](https://www.php.net/downloads)

Download and Installation
-------------------------

[](#download-and-installation)

### Standalone

[](#standalone)

- Clone the repo.
- Run `composer update`.

### In a project

[](#in-a-project)

- Run `composer config repositories.gigyaphpsdk git https://github.com/SAP/gigya-php-sdk.git`
- Run `composer require gigya/php-sdk`

It will now be possible to autoload Gigya PHP SDK: `use Gigya\PHP`.

Note: If the project does not use Composer natively / as part of a framework, it is necessary to include `vendor/autoload.php` in your project.

Configuration
-------------

[](#configuration)

- [Obtain a Gigya APIKey and authentication details](https://developers.gigya.com/display/GD/PHP#PHP-ObtainingGigya'sAPIKeyandSecretkey).
- Follow the installation instructions above.
- Start using according to [documentation](https://developers.gigya.com/display/GD/PHP).

Running tests
-------------

[](#running-tests)

1. Copy `tests/provideAuthDetails.json.dist` to `tests/provideAuthDetails.json`
2. If testing JWT-related functions, create a private key file.
3. Enter the relevant authentication details and the private key file path in `tests/provideAuthDetails.json`.

Using Mutual TLS (mTLS) Authentication
--------------------------------------

[](#using-mutual-tls-mtls-authentication)

For high-security server-to-server communication, you can authenticate using a client X.509 certificate instead of (or alongside) the site secret. When mTLS is configured, the SDK automatically routes the request to the datacenter-specific endpoint `mtls.{datacenter}.gigya.com` and presents the certificate during the TLS handshake.

### Example with Certificate Files

[](#example-with-certificate-files)

```
use Gigya\PHP\GSRequest;

// Create a request — apiKey/secretKey are not required when using mTLS
$request = new GSRequest(
    'your-api-key',
    null,                        // no secretKey
    'accounts.getAccountInfo',
    null,
    true                         // useHTTPS — required for mTLS
);

$request->setAPIDomain('us1.gigya.com');
$request->setParam('UID', 'user123');

// Configure the client certificate
$request->setClientCertificate(
    'certs/client.pem',          // Path to client certificate
    'certs/client.key'           // Path to private key
);

$response = $request->send();

if ($response->getErrorCode() == 0) {
    echo "Success: " . $response->getResponseText();
} else {
    echo "Error: " . $response->getErrorMessage();
}
```

### Example with PEM Content

[](#example-with-pem-content)

You can also pass certificate and key content directly as PEM strings, which is useful when loading from environment variables or a secret store. PEM strings are written to short-lived temp files for the duration of the request.

```
$certPem = getenv('MTLS_CERT_PEM');
$keyPem  = getenv('MTLS_KEY_PEM');

$request->setClientCertificate($certPem, $keyPem);
```

If the private key is encrypted, pass the password as the third argument:

```
$request->setClientCertificate('certs/client.pem', 'certs/client.key', 'key-password');
```

**Note:** Both the certificate and key must be provided together. Each can be either a file path or PEM content.

Limitations
-----------

[](#limitations)

None

Known Issues
------------

[](#known-issues)

None

How to obtain support
---------------------

[](#how-to-obtain-support)

[Learn more](https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/4167e8a470b21014bbc5a10ce4041860.html)

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

[](#contributing)

Via pull request to this repository.

Code of Conduct
---------------

[](#code-of-conduct)

See [CODE\_OF\_CONDUCT](https://github.com/SAP/gigya-php-sdk/blob/main/CODE_OF_CONDUCT.md)

To-Do (upcoming changes)
------------------------

[](#to-do-upcoming-changes)

None

Licensing
---------

[](#licensing)

Please see our [LICENSE](https://github.com/SAP/gigya-php-sdk/blob/main/LICENSE.txt) for copyright and license information.

[![REUSE status](https://camo.githubusercontent.com/af01db68309806aeb8230ed280c82832391bdfdba59e729c1111f54482d06c35/68747470733a2f2f6170692e72657573652e736f6674776172652f62616467652f6769746875622e636f6d2f5341502f67696779612d7068702d73646b)](https://api.reuse.software/info/github.com/SAP/gigya-php-sdk)

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance77

Regular maintenance activity

Popularity45

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor4

4 contributors hold 50%+ of commits

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 ~354 days

Recently: every ~287 days

Total

7

Last Release

140d ago

PHP version history (2 changes)3.0PHP &gt;=7.0

3.0.4PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/004b5c1ecc90c7727291a8a4c9274a5a4cc5c174b82f137109606f4d5f89bffc?d=identicon)[gigya-idx](/maintainers/gigya-idx)

---

Top Contributors

[![Ynhockey](https://avatars.githubusercontent.com/u/2094765?v=4)](https://github.com/Ynhockey "Ynhockey (24 commits)")[![strusbergAlex](https://avatars.githubusercontent.com/u/60701470?v=4)](https://github.com/strusbergAlex "strusbergAlex (16 commits)")[![shemma3](https://avatars.githubusercontent.com/u/107474914?v=4)](https://github.com/shemma3 "shemma3 (13 commits)")[![IliaGurevich](https://avatars.githubusercontent.com/u/112001845?v=4)](https://github.com/IliaGurevich "IliaGurevich (11 commits)")[![levistepanov](https://avatars.githubusercontent.com/u/13661287?v=4)](https://github.com/levistepanov "levistepanov (11 commits)")[![Kobico-sap-zz](https://avatars.githubusercontent.com/u/62291232?v=4)](https://github.com/Kobico-sap-zz "Kobico-sap-zz (9 commits)")[![galForReal](https://avatars.githubusercontent.com/u/100084287?v=4)](https://github.com/galForReal "galForReal (9 commits)")[![kobico](https://avatars.githubusercontent.com/u/95193762?v=4)](https://github.com/kobico "kobico (6 commits)")[![dekelev](https://avatars.githubusercontent.com/u/4444781?v=4)](https://github.com/dekelev "dekelev (5 commits)")[![tal-mi](https://avatars.githubusercontent.com/u/47209216?v=4)](https://github.com/tal-mi "tal-mi (4 commits)")[![estira](https://avatars.githubusercontent.com/u/124678369?v=4)](https://github.com/estira "estira (1 commits)")[![zoharsap](https://avatars.githubusercontent.com/u/72385396?v=4)](https://github.com/zoharsap "zoharsap (1 commits)")

---

Tags

open-source

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[plivo/plivo-php

A PHP SDK to make voice calls &amp; send SMS using Plivo and to generate Plivo XML

1113.2M19](/packages/plivo-plivo-php)[plivo/php-sdk

A PHP SDK to make voice calls &amp; send SMS using Plivo and to generate Plivo XML

1112.1M6](/packages/plivo-php-sdk)[celtic/lti

PHP class library for building LTI integrations

60326.3k11](/packages/celtic-lti)[exinone/mixin-sdk-php

Mixin-Network SDK for PHP, modify from ExinOne/laravel-mixin-sdk

242.5k4](/packages/exinone-mixin-sdk-php)

PHPackages © 2026

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