Download the PHP package uchara/uchara-php without Composer

On this page you can find all versions of the php package uchara/uchara-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package uchara-php

Uchara PHP SDK

Official PHP SDK for the Uchara Chat Platform. It provides:

Requirements

Installation

For Laravel 10/11 the service provider and facade are registered automatically via package auto-discovery. Publish the config file with:

Quick Start — Server SDK

Members (a.k.a. agents)

Workspace members are the human users of a workspace. Because many users refer to them as "agents", ergonomic Agent aliases are provided alongside the canonical Member methods.

Invites

Channels, Bots & Messages

Quick Start — Agent SDK

Use AgentSDK when messages must appear as a specific human agent. The API derives sender_type=agent and sender_id from the access token, so do not provide those fields yourself.

The access and refresh tokens are stored in the SDK instance. Refresh the session when needed:

Multi-agent collaboration and approval flow

Conversations support multiple collaborating agents. There is no separate "approval" endpoint: an authorized assignee/admin invites an existing same-workspace member, and that member accepts by joining. Identity and authorization are always derived from the authenticated member's JWT — the SDK never sends an inviter field.

takeoverConversation() is a separate bot-to-agent takeover — it transitions a bot conversation to open and assigns it to the calling agent. It is not a collaborator approval step and does not replace the invite → join flow above.

Secure backend-to-browser agent session (legacy agent-token flow)

Prefer the one-time dashboard SSO flow described under the Server SDK section below for seamless dashboard handoff. This agent-token flow remains supported for existing integrations.

For a custom browser dashboard, do not expose the Server API key. Create the short-lived agent session on your backend and return only the token pair to the browser:

Then initialize the browser Agent SDK with the returned session:

The agent-token endpoint verifies that the email belongs to an active member in the API key's workspace. Access tokens are short-lived; keep and rotate the refresh token according to your frontend session policy.

One-time dashboard SSO

For a seamless handoff from your own authenticated backend to the Uchara dashboard, issue a one-time SSO ticket with the Server SDK and return the resulting redirect_url to the browser. The API key stays on your backend; the browser only ever sees an opaque, short-lived ticket in the URL fragment.

There is no dedicated SDK helper for this — use the underlying HTTP client via ServerSDK::http()->post(...):

Security guidance:

Quick Start — Visitor SDK

Read receipts & delivery status

Every message carries a delivery_status field (plus delivery_status_at and, on failure, delivery_error). The lifecycle is monotonic and idempotent:

with failed (and recovered for messages that later succeed). The possible values are exposed as constants on Uchara\SDK\DeliveryStatus:

Mark a conversation as read so the other side sees a read receipt on their own sent messages:

Factory

The Uchara factory builds SDK instances from a config array or directly:

Laravel

Set the environment variables and use the facade:

Error Handling

UcharaException exposes the HTTP status via getStatus() (alias of getCode()), the parsed error payload via getDetails(), and the full structured response via getResponse().

Advanced HTTP access

The simple helpers (get/post/patch/put/delete) return the unwrapped data payload. When you need the status code, pagination meta or response headers, use request():

Development

Documentation

Full documentation: https://www.uchara.com/docs/sdk/php

License

MIT


All versions of uchara-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.5
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package uchara/uchara-php contains the following files

Loading the files please wait ...