Help & Support
Our help database contains answers to most of the common questions regarding our products.
If you are unable to locate a satisfactory answer for your query by searching here, please contact us.
I lost my Cbox embed code. Where can I get it?
Your Cbox embed code is available at your control panel. You need this code to install your Cbox on your website.
Also on that page is your Quick Link — a URL which you can use to access your Cbox directly in your browser or on your mobile device.
How do I put my Cbox on my website?
Once you have created your Cbox account, go to the Publish page of your control panel. The code and steps for embedding your Cbox are provided there for a number of common platforms.
If you install your Cbox and all you see is code, or nothing at all, your web host may be removing or otherwise interfering with the HTML iframe tags that Cbox uses. Your Cbox code needs to be pasted into an area of your site that accepts HTML without modification. This may mean switching your editor from "rich text" or "WYSIWYG" mode into HTML-editing or "raw" mode, or you may need to open your template files in a plain-text editor like Notepad.
Remember that you always have the option of posting or sharing your Cbox Quick Link — this gives visitors direct access to your Cbox in a full-screen layout, so it's perfect as a mobile option or for stand-alone use.
How do change my Cbox's style to go with my site's design?
Go to the Theme editor in your control panel. There you can specify the fonts and colours of your Cbox, using a point-and-click editor. You can always reset your theme to one of the preset defaults there, if you would like to start again.
If you have a Premium or Pro Cbox you can edit CSS, which gives you complete control over presentation.
How do I delete messages?
If you have a Premium or Pro Cbox, you can create a moderator name for yourself at your Users page, and then log in on your Cbox using the "profile" link. You will see a delete icon [x] next to each message in your Cbox, and you will not have to log in at your control panel at all to delete messages.
Alternatively, visit your Messages page to delete messages individually or in bulk. Deleted messages are removed from your public Cbox history, but are preserved in your Archives.
Can I make my Cbox transparent?
Yes. In the Theme editor, simply delete the colour codes for the main and form background ("BG") elements. This will make the Cbox transparent, allowing whatever is behind the Cbox to show through.
Note that any pop-ups generated by a transparent Cbox will have the default background colour — usually white. If your font colour is light, it may be invisible in popups. You can fix this by editing the CSS to introduce a background-color rule for popups.
Push notifications
We're excited about this feature, but please note that the technology that supports it is relatively new; there are some limitations and there may be some disruptions as we work on it in future.
You will often want to know when a message has been posted on your Cbox while you have been away from the chat. Today on Android smartphones and tablets using Chrome browser, and for Chrome on the desktop, it's possible to subscribe for push notifications for Cbox messages.
This feature is only available to paid Cboxes, at your Quick Link, and for technical reasons it's only available when the page is loaded over SSL/TLS. Your browser address bar should start https://my.cbox.ws/[your_Cbox_name]
Note: If you accidentally click "deny" to the browser permission request, you will need to reset your browser's privacy settings: in Chrome, delete the Cbox entry at chrome://settings/content under "Notifications" -> "Manage exceptions..."
If you see the bell icon at the top right, you are all set: click or tap the bell to subscribe. The first time you do this, your browser will ask permission to send you notifications on behalf of Cbox. Once we have subscribed you, the bell icon will change — you can click it again to unsubscribe from this Cbox.
Once you are subscribed for notifications, you will receive messages in your device's notification bar whenever new messages are posted to your Cbox. This will work even if the tab is closed. On desktop, Chrome may need to be running but you will not need to have Cbox open in any window.
You can have multiple subscriptions for different Cboxes and you will receive notifications for each. We combine notifications for channels and also rate-limit them to minimize potential disruption.
We are looking forward rolling this important feature out to more browsers and devices in future. Your feedback is invaluable during this process — let us know what you think.
Using the Cbox webhook
Getting started
This feature requires some familiarity with hosting your own scripts on the Web. Our code examples are in PHP, but you can use any platform and programming language you like, providing you can access HTTP POST data.
The Cbox webhook is an HTTP POST callback mechanism for getting a copy of new messages as they are posted to your Cbox. A couple of lines of PHP are sufficient to get started:
<?php
$input = @file_get_contents("php://input");
$json = json_decode($input);
// $json contains array of messages
error_log(print_r($json, true), 1, "your-email@example.com");
echo "OK";
?>
With the above code uploaded to your server, test that it works by opening the corresponding URL, e.g. https://yoursite.example.com/cbox.php, and confirming that you see "OK". You can then enter it as your callback URL in your Cbox settings.
When a user posts a message, Cbox will issue an HTTP POST request to your callback URL,
with Content-Type application/json. The request body will look something like this:
[{"type":"message","box":802140,"channel":0,"time":1488526982,"uid":0,"name":"test","text":"this is a test","link":"","ip":"0.0.0.0"}]
The object is an array of messages. There can be multiple messages in a single POST. Your code can do whatever you like with the messages; it just needs to return an HTTP OK status to Cbox. Any response body is ignored.
Message contents
The message webhook is located after the message-accepted stage and before filtering. This means your endpoint will only receive messages that are being published on your Cbox (i.e. not messages from banned users). They will be "raw", having none of the built-in or custom filters applied (i.e. no boxcode expansion). Important to note is that messages can contain any UTF-8 character, and so should be escaped as appropriate before storage or display.
Message properties:
type— always set to "message"box— your Cbox ID.channel— The channel ID to which the message was posted.id— The message ID.time— Unix times when the message was received.uid— Registered user ID. Guest IDs are undefined or zero.name— The user's name, as entered.text— The text of the message, as entered.link— Link associated with the message; the profile URL.ip— IP address of the user.
Errors and retry
Your endpoint needs to return an HTTP success header (status codes in the 2XX range) in response to the POST.
If it returns any other status, or times out, Cbox will consider the delivery to have failed. On failure, Cbox will buffer messages for
retry. Cbox will retry the POST at increasingly long intervals, even in the absence of further new messages.
Cbox buffers are not unlimited; if your endpoint is down for an extended time, the oldest messages may be dropped.
Notes
- Cbox ignores the body sent in response to the POST, and does not wait for it to complete.
- Return a
200 OKto Cbox as quickly as possible. Otherwise, there is a risk of a timeout, which will cause the same message(s) to be re-sent. If your message processing is slow, move it "offline", either by completing and flushing the HTTP response early and continuing to work, or by offloading incoming messages to another service. - For forwards-compatibility, confirm that
type == 'message'in your code; new event types may be supported in future. - The box and channel properties mean you can multiplex several Cboxes to a single endpoint, and filter or switch based on channel.
- Message ID is a monotonically increasing number. Larger IDs are always newer messages.
- Although some properties are 32-bit integers, it's recommended that you treat all values as UTF-8 strings for storage or further processing.
- The POST request includes a custom HTTP header,
X-Cbox-Timewhich contains the Unix timestamp at the moment the POST was sent. You can use this to calculate differential message times.
How do I cancel my automatic billing?
If you are a paid customer with a recurring payment profile (or subscription) at PayPal, then you can cancel it at any time. Your Cbox will not automatically be closed and if you have remaining credit it will continue to work. You will be able to upgrade or renew again manually — this is useful if you want to switch to a longer term.
Cancel an active payment profile with the following steps:
- Go to PayPal.com and sign in.
- Go to "Activity" for your transaction history.
- Search for the email address "paypal@cbox.ws".
- You should see your latest payment to Cbox. Click to view its details.
- Locate the link to the profile or subscription on the payment details page.
- From the recurring profile details, you will be able to cancel your subscription.
If you do not see a link to the profile or subscription from the payment details page, then it may have been a one-off payment with no associated automatic billing.
How do I close my Cbox account?
If you have installed the Cbox HTML embed code on your site, delete the code there. Then, you can close your Cbox account in your control panel at this page. Note that your account name will remain reserved on our system. If you want to create a new account with the same name, change the name on the old one before deleting it.
Every time I do something in the control panel, I get logged out.
You need to have cookies enabled in your browser in order to use the control panel. Your browser may be configured not to accept cookies, or it may be in a "private browsing" mode, or you may have a plugin or extension that is restricting them. Test in another browser if possible.