PHPackages                             chatway-live-chat/chatway-live-chat-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. chatway-live-chat/chatway-live-chat-php

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

chatway-live-chat/chatway-live-chat-php
=======================================

Embed Chatway chat widget in any PHP app

v1.0.1(11mo ago)2816MITPHP

Since Jul 7Pushed 11mo agoCompare

[ Source](https://github.com/Chatway-app/chatway-live-chat-php)[ Packagist](https://packagist.org/packages/chatway-live-chat/chatway-live-chat-php)[ RSS](/packages/chatway-live-chat-chatway-live-chat-php/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Chatway PHP SDK
===============

[](#chatway-php-sdk)

The **Chatway live chat PHP SDK** is a lightweight, framework-agnostic PHP library that allows you to easily embed the [Chatway](https://chatway.app/?utm_source=packagist) live chat customer support widget on your website and securely identify your visitors using a simple, chainable API.

Chatway is a powerful live chat solution for websites, offering features such as live chat customer support, real-time visitor tracking, customizable widgets, canned responses, FAQs, multilingual support, private notes, visitor segmentation, analytics, and more. Chatway is available as a web app, as well as native iOS and Android apps.

This SDK works with any PHP application, including Laravel, WordPress, custom frameworks, or plain PHP projects.

[![chatway-pack](https://private-user-images.githubusercontent.com/64247665/461909010-23333c76-e427-487d-8341-d8579fe537de.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODIyODEyMzAsIm5iZiI6MTc4MjI4MDkzMCwicGF0aCI6Ii82NDI0NzY2NS80NjE5MDkwMTAtMjMzMzNjNzYtZTQyNy00ODd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UwYWU3MDY1ZjBiZjg0YmQ0MGFmZjBkMDZiMTIxOGJiZDIyYTU2ZjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.nfJayr5m9c_rVob3mkDZw8BazvNgIT5YaYTshXZdlak)

---

Key Features
------------

[](#key-features)

- Easily embed the Chatway live chat widget using your project’s widget ID
- Securely verify visitors by ID or email (optional)
- Assign tags with custom colors
- Attach custom fields to visitor sessions
- Clean, chainable syntax
- Fully HTML-escaped output for security

---

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

[](#installation)

To install the SDK via Composer:

```
composer require chatway-live-chat/chatway-live-chat-php
```

---

Basic Usage
-----------

[](#basic-usage)

Embed the Chatway live chat widget without visitor verification:

```
echo Chatway\Chatway::make('your-widget-id')->getScript();
```

You can find your widget ID on the [Chatway Installation Page](https://go.chatway.app/installation) (`id=WIDGET_ID`).

---

Visitor Verification (Optional)
-------------------------------

[](#visitor-verification-optional)

To securely verify logged-in visitors, provide:

- The **user ID**
- The **email address**
- A **secret key** from the [Visitor Verification page](https://go.chatway.app/visitors-verification)
- Whether to generate the signature based on `'id'` or `'email'`

All four parameters are required for visitor verification.

Example:

```
echo Chatway\Chatway::make('your-widget-id', 'your-secret-key', 'id')
    ->withVisitor('123', 'user@example.com')
    ->getScript();
```

This will generate a secure `window.chatwaySettings` block containing a signature and load the chat widget.

---

Adding Tags
-----------

[](#adding-tags)

You can assign tags to visitors, each with a name and color.

**Single Tag:**

```
->setTags('VIP', '#FFD700')
```

**Multiple Tags:**

```
->setTags([
    'VIP' => '#FFD700',
    'Supporter' => '#00FF00'
]);
```

---

Custom Fields
-------------

[](#custom-fields)

You can attach custom fields to enrich visitor session data.

**Single Field:**

```
->setCustomFields('Plan', 'Premium')
```

**Multiple Fields:**

```
->setCustomFields([
    'Subscription' => 'Gold',
    'Status' => 'Active'
]);
```

---

Full Example
------------

[](#full-example)

```
echo Chatway\Chatway::make('your-widget-id', 'your-secret-key', 'email')
    ->withVisitor('123', 'user@example.com')
    ->setTags('VIP', '#FFD700')
    ->setTags(['Supporter' => '#00FF00'])
    ->setCustomFields('Plan', 'Pro')
    ->setCustomFields([
        'Country' => 'USA',
        'Language' => 'English'
    ])
    ->getScript();
```

---

Important Notes
---------------

[](#important-notes)

- For visitor verification, you **must** provide:
    - `make(widgetId, secretKey, basedOn)`
    - `withVisitor(userId, email)`
- The `basedOn` parameter must be either `'id'` or `'email'`
- All tag names, tag colors, field names, and field values must be strings
- Tags must be an associative array in the format `name => color`
- Custom fields must be an associative array in the format `name => value`

Invalid input will result in an `InvalidArgumentException`.

---

License For This Package
------------------------

[](#license-for-this-package)

MIT License © [Chatway](https://chatway.app)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance50

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

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

Every ~3 days

Total

2

Last Release

359d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f0652fd8747e59d96833b77a4bf43247a582b9aa84f8cd4b05bb2fcbb9541c80?d=identicon)[Chatway-live-chat](/maintainers/Chatway-live-chat)

---

Top Contributors

[![thenibirahmed](https://avatars.githubusercontent.com/u/64247665?v=4)](https://github.com/thenibirahmed "thenibirahmed (18 commits)")

### Embed Badge

![Health badge](/badges/chatway-live-chat-chatway-live-chat-php/health.svg)

```
[![Health](https://phpackages.com/badges/chatway-live-chat-chatway-live-chat-php/health.svg)](https://phpackages.com/packages/chatway-live-chat-chatway-live-chat-php)
```

###  Alternatives

[m2-boilerplate/module-critical-css

Magento 2 module to automatically generate critical css with the addyosmani/critical npm package

3684.7k](/packages/m2-boilerplate-module-critical-css)[jajuma/awesomehyva

This Magento 2 extension allows using Font Awesome 5 icons with Hyvä Themes

1354.7k](/packages/jajuma-awesomehyva)[ijeffro/laravel-cities

Laravel Cities is a bundle for Laravel, providing Iata Code ISO 3166 3 and country codes for all the cities.

118.2k](/packages/ijeffro-laravel-cities)

PHPackages © 2026

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