PHPackages                             trustswiftly/trustswiftly-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. [HTTP &amp; Networking](/categories/http)
4. /
5. trustswiftly/trustswiftly-php-sdk

ActiveLibrary[HTTP &amp; Networking](/categories/http)

trustswiftly/trustswiftly-php-sdk
=================================

Common interface for HTTP clients

1.0.0(1y ago)013MITPHPPHP &gt;=7.0

Since Jan 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/trustswiftly/trustswiftly-php-sdk)[ Packagist](https://packagist.org/packages/trustswiftly/trustswiftly-php-sdk)[ Docs](https://github.com/php-fig/http-client)[ RSS](/packages/trustswiftly-trustswiftly-php-sdk/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

trustswiftly-php-sdk
====================

[](#trustswiftly-php-sdk)

PHP SDK for the TrustSwiftly

Our official API documentation is at [TrustSwifly Integration Documentation](https://docs.trustswiftly.com)

Installation
------------

[](#installation)

### With Composer

[](#with-composer)

```
composer require trustswifly/trustswiftly-php-sdk

```

```
"trustswiftly/trustswiftly-php-sdk": "^1.0"

```

Usage
-----

[](#usage)

### Intialize Configs

[](#intialize-configs)

```
$trustObject = new TrustSwiftly\TrustSwiftly($api_key, $base_url, $api_secret, $embed_key);
```

### Validate Configs

[](#validate-configs)

```
$validationResponse = TrustSwiftly\TrustSwiftly::validateCredentials($key,$base_url,$api_secret,$embed_key);
```

[User Apis](https://docs.trustswiftly.com/users)

### Get All Users

[](#get-all-users)

```
$filterAndSortOptions=[
        'per_page'=>2
    ];
$userData=$trustObject->userClient()->getAllUsers($filterAndSortOptions);
```

### Get User Details By Id

[](#get-user-details-by-id)

```
$userDetails=$trustObject->userClient()->getUserDetails($user_id);
```

> User Object

```
$user=$userDetails->user();
```

> User Verifications

```
$user=$userDetails->userVerifications();
```

### Create User

[](#create-user)

```
$userData = [
        'email'=>'test@example.com'
    ];
$userCreateData = $trustObject->userClient()->createUser($userData);
```

### User Update

[](#user-update)

```
$updateData=[
        'first_name'=>'asd'
    ];
$userDetails=$trustObject->userClient()->updateUser($user_id,$updateData);
```

### User Verification Update

[](#user-verification-update)

```
$updateData=[
        'verification_id'=>xx,
        'status'=>xx
    ];
$userVerificationData=$trustObject->userClient()->updateUserVerification($user_id,$updateData);
```

### Delete User

[](#delete-user)

```
$userDetails=$trustObject->userClient()->deleteUser($user_id);
```

### Get Magic Link

[](#get-magic-link)

```
$userDetails=$trustObject->userClient()->getMagicLink($user_id);
```

[Template Apis](https://docs.trustswiftly.com/templates)

### Get Templates

[](#get-templates)

```
$templateData=$trustObject->templateClient()->getVerificationTemplates();
```

[Stat Apis](https://docs.trustswiftly.com/stats)

### Get Statistics

[](#get-statistics)

```
$statData=$trustObject->statisticsClient()->getVerificationStats();
```

### Signatures

[](#signatures)

Embed

```
$embedSignature=$trustObject->getEmbedSignature($user_id);
```

Webhook

```
$result=TrustSwiftly\TrustSwiftly::verifyWebhookSignature($receivedSignature,file_get_contents("php://input"),$signatureSecret);
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance44

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

466d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c88264b5661e37abc82e64703c1a3bedbd0daa697f9861a614652b113d9951ea?d=identicon)[trust-swift1](/maintainers/trust-swift1)

---

Top Contributors

[![trustswiftly](https://avatars.githubusercontent.com/u/77164182?v=4)](https://github.com/trustswiftly "trustswiftly (2 commits)")

---

Tags

httppsrhttp clientpsr-18

### Embed Badge

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

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

###  Alternatives

[psr/http-client

Common interface for HTTP clients

1.7k680.7M2.1k](/packages/psr-http-client)[art4/requests-psr18-adapter

Use WordPress/Requests as a PSR-18 HTTP client

153.3k](/packages/art4-requests-psr18-adapter)[m6web/guzzle-http-bundle

Symfony bundle on top of Guzzle

17511.5k2](/packages/m6web-guzzle-http-bundle)[amphp/http-client-psr7

PSR-7 adapter for Amp's HTTP client.

1454.7k4](/packages/amphp-http-client-psr7)[slimpay/hapiclient

An HTTP Client using HAL as the format for resources.

14317.3k](/packages/slimpay-hapiclient)[zoonman/pixabay-php-api

PixabayClient is a PHP HTTP client library to access Pixabay's API

3354.7k](/packages/zoonman-pixabay-php-api)

PHPackages © 2026

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