PHPackages                             commentsold/commentsold-sdk-php - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. commentsold/commentsold-sdk-php

ActiveProject[Utility &amp; Helpers](/categories/utility)

commentsold/commentsold-sdk-php
===============================

CommentSold SDK

v0.4.0(1y ago)216MITPHPPHP &gt;=8.1

Since Oct 4Pushed 1y ago4 watchersCompare

[ Source](https://github.com/CommentSold/commentsold-sdk-php)[ Packagist](https://packagist.org/packages/commentsold/commentsold-sdk-php)[ RSS](/packages/commentsold-commentsold-sdk-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (0)

CommentSold PHP SDK
===================

[](#commentsold-php-sdk)

This SDK can be used to integrate with CommentSold via their RESTful API. Documentation for the API can be found at

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

[](#requirements)

PHP 8.1 and later.

Composer
--------

[](#composer)

You can install the bindings via [Composer](http://getcomposer.org/). Run the following command:

```
composer require commentsold/commentsold-sdk-php
```

Getting Started
---------------

[](#getting-started)

Before using the SDK you will need to get a `Partner ID` and `Private Key` from [CommentSold](https://commentsold.com).

There are two main sections of the API. There are the global partner functions and then the shop specific functions. The SDK is broken up to correspond to those two scopes. Both require their own token, so be mindful of which you are using where.

The first step for either is to obtain a token. Tokens are valid for 24 hours, so you should save them locally and reuse them in order to reduce unnecessary API calls.

Example global scope SDK usage:

```
require __DIR__.'/vendor/autoload.php';

$environment = new CommentSold\Resources\TokenizerEnvironment(CommentSold\Enums\Environment::PRODUCTION);
$tokenizer = new CommentSold\Tokenizer('my_private_key', 'my_partner_id', $environment);
$token = $tokenizer->getPartnerToken();

$environment = new CommentSold\Resources\ClientEnvironment(CommentSold\Enums\Environment::PRODUCTION);
$client = new CommentSold\GlobalClient($token, $environment);
$api = new CommentSold\Services\AccountApi($client);
$request = new CommentSold\Resources\Request\Account\GetOauthUrlRequest(['all'], 'https://my-return-url.com/oauth');
$oauthUrl = $api->getOauthUrl($request);
```

Example shop scope SDK usage:

```
require __DIR__.'/vendor/autoload.php';

$environment = new CommentSold\Resources\TokenizerEnvironment(CommentSold\Enums\Environment::PRODUCTION);
$tokenizer = new CommentSold\Tokenizer('my_private_key', 'my_partner_id', $environment);
$token = $tokenizer->getShopToken('my-shop');

$environment = new CommentSold\Resources\ClientEnvironment(CommentSold\Enums\Environment::PRODUCTION);
$client = new CommentSold\ShopClient('my-shop', $token, $environment);
$api = new CommentSold\Services\ProductApi($client);
$request = new CommentSold\Resources\Request\Product\GetProductsRequest();

// raw response object
$response = $api->getProducts($request);
// the response data object (in this case an array of product objects)
$products = $response->getData();
// if you would rather work with the response as an array
$productsAsArray = $response->getData()->toArray();

// the pagination detail object
$pagination = $response->getPagination();
// the total number of results
$totalCount = $pagination->total;
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.4% 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 ~75 days

Total

4

Last Release

723d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/28012f6d2a6184b781372e511dd72119b20057cb3e0482846c2e5b846b12b92d?d=identicon)[craig.noll](/maintainers/craig.noll)

---

Top Contributors

[![craignoll-cs](https://avatars.githubusercontent.com/u/95655565?v=4)](https://github.com/craignoll-cs "craignoll-cs (32 commits)")[![younkim](https://avatars.githubusercontent.com/u/8534941?v=4)](https://github.com/younkim "younkim (3 commits)")

---

Tags

sdkCommentSold

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[infusionsoft/php-sdk

PHP SDK for the Infusionsoft

1292.1M7](/packages/infusionsoft-php-sdk)[corley/influxdb-sdk

Send your app metrics to InfluxDB

84296.5k2](/packages/corley-influxdb-sdk)

PHPackages © 2026

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