https://github.com/sooluh/papercups
:headphones: Unofficial Papercups PHP library provides convenient access to the Papercups API from applications written in server-side PHP.
https://github.com/sooluh/papercups
chat-widget customer-support hacktoberfest hacktoberfest2022 help-desk intercom livechat papercups php
Last synced: 3 months ago
JSON representation
:headphones: Unofficial Papercups PHP library provides convenient access to the Papercups API from applications written in server-side PHP.
- Host: GitHub
- URL: https://github.com/sooluh/papercups
- Owner: sooluh
- License: mit
- Created: 2021-08-09T07:28:59.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-24T06:24:19.000Z (almost 3 years ago)
- Last Synced: 2025-03-19T20:39:56.275Z (about 1 year ago)
- Topics: chat-widget, customer-support, hacktoberfest, hacktoberfest2022, help-desk, intercom, livechat, papercups, php
- Language: PHP
- Homepage: https://packagist.org/packages/sooluh/papercups
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Papercups PHP
[](https://packagist.org/packages/sooluh/papercups)
[](https://packagist.org/packages/sooluh/papercups)
[](https://packagist.org/packages/sooluh/papercups)
[](https://packagist.org/packages/sooluh/papercups)
Unofficial Papercups PHP library provides convenient access to the Papercups API from applications written in server-side PHP.
## Requirements
- PHP >= 7.3
- Composer
## Features
- PSR-4 autoloading compliant structure
- PSR-2 compliant code style
- Easy to use with any framework or even a plain php file
- Useful tools for better code included
## Installation
Install the package with:
```sh
composer require sooluh/papercups
```
## Usage
The package needs to be configured with an API key, which is available in the [Papercups dashboard](https://app.papercups.io/developers/personal-api-keys). Require the package with the key's value:
```php
messages()->create([
'body' => 'Hello world!',
'conversation_id' => '...'
]);
print_r($response);
```
If you're self-hosting Papercups on a different server, you can specify the API host:
```php
$papercups = new \Papercups\Client('PAPERCUPS_API_KEY', 'https://papercups.mycompany.co');
```
## License
Code licensed under [MIT License](./LICENSE).