Skip to content

Basic Auth

In this article, we will explore basic authorization used to access many of the Rox.Chat API services.

With this authorization method, a username:password pair is transmitted in the request header. Data encoding uses the Base64 standard, which converts user data into a 64-character string.

In Rox.Chat, basic authorization supports the following mechanisms:

By default, API access is restricted. To gain access to the Rox.CHat API, you need to contact the technical support.

Base URL

For requests that require basic authorization, you use the client's base URL.

The base URL is the domain of your account. It depends on your network configuration: you choose it for local setups, while for cloud configurations, it appears as:

https://{account_name}.rox.chat/

Where account_name is the name of your Rox.Chat account.

Requests are sent to the base URL to access the Rox.Chat API.

Example of a prepared request to Rox.Chat Stored Data API:

https://test.rox.chat/api/v4/operators

This request should return a list of all agents.

Authorization

Use the Email and password of a Rox.Chat user with an administrator role for authorization.

To perform basic authorization, follow this method:

curl -u {admin_email}:{admin_password} {base_url}/api/{request}

Where admin_email is the administrator's email, admin_password is the administrator's password, base_url is the base URL for your network configuration, and request is your API query.

Here's a curl request example:

curl -u johndoe@rox.chat:password12345 https://companyname.rox.chat/api/v2/operators

After curl -u, you'll input the user's email, followed by a colon, their password, and then the request URL.

The API operates exclusively over the HTTPS protocol.

All data returns in the UTF-8 encoding.

Time format follows ISO 8601 with UTC as the time zone.

Time intervals format: seconds.

When working over HTTPS, ensure your library supports SNI.