PHPackages                             easyatworkas/sunshineconversations - 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. easyatworkas/sunshineconversations

ActiveLibrary[API Development](/categories/api)

easyatworkas/sunshineconversations
==================================

PHP client lib for Sunshine Conversations.

07.2k—2.5%PHP

Since Nov 14Pushed 1y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#installation)

Install it with composer:

```
composer require easyatworkas/sunshineconversations
```

Usage
-----

[](#usage)

### Authentication

[](#authentication)

```
// Create a client.
$client = new SmoochApiClient();
$client->setBaseUri('https://easyatwork.zendesk.com/sc/v2');
$client->authenticate('your api key', 'your api secret');

// Create an "app".
$app = new SmoochApp($client, 'your app id');
```

### Basics

[](#basics)

```
// Find an existing user.
$user = $app->getUser(3)->getData();

// List their conversations.
$conversations = $app->listConversations($user['id'])->getData();

// Unless multi conversation mode is enabled, each user will only ever have one conversation.
$activeConversation = reset($conversations);

$app->createMessageAsBusiness($activeConversation['id'], 'Hello! How can I help you today?');
```

### Pagination

[](#pagination)

When you have an instance of `SmoochApiPaginatedResponse` you can invoke `hasMore()` to see if there are more pages available, then use `nextPage()` to generate the request parameters required to fetch the next page. Simply pass these parameters back to the relevant request method.

```
$messages = [];
$pageParams = [];

do {
    $response = $app->listMessages($conversation['id'], $pageParams);

    $messages = array_merge($messages, $response->getData());
} while ($response->hasMore() && $pageParams = $response->nextPage());

foreach ($messages as $message) {
    echo $message['author']['displayName'] ?? 'Bot', ': ', $message['content']['text'], PHP_EOL;
}
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity16

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0665a4f04a636fa21c2896fc63b891b3f34d6c6e78a38def6e4391a2552a4c2?d=identicon)[Jckf](/maintainers/Jckf)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/easyatworkas-sunshineconversations/health.svg)

```
[![Health](https://phpackages.com/badges/easyatworkas-sunshineconversations/health.svg)](https://phpackages.com/packages/easyatworkas-sunshineconversations)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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