• Hosted in the EU
  • GDPR Compliant

Co-Browsing Server API

Co-Browsing Server API

Step 1: Add this Co-browsing script

Copy and paste this code to every page where you want the co-browsing digits to display. Support agents can request this number from the customer in order to start a cobrowsing session.

  1. <p id="wwwchannelme" data-code="your-partner-id">0000</p>
  2. <script type="text/javascript" src="//channel.me/siteconnect.js"></script>

Step 2 Server API calls

You can start with cobrowsing without any technical implemantation on your own side by using the account interface of channel.me. If you want to integrate channel.me's cobrowsing solution into your own product you need to implement the following calls.

API url to start a session.

  1. http://channel.me/api/cobrowse/start

Example Request

curl -i https://channel.me/api/cobrowse/start -d security_code=8500 -u  email@example.com:FhdrRs34

Example Response

HTTP/1.1 200 OK
Vary: Accept
Server: MochiWeb/1.1 WebZMachine/2.0 (Z) Zotonic/0.13
Date: Tue, 01 Apr 2014 13:07:38 GMT
Content-Type: application/json
Content-Length: 126

{"status":"ok","session_url":"http://channel.me/session/XTb1BspFQ7IsfQOfTOXhVMali","session_id": "XTb1BspFQ7IsfQOfTOXhVMali"}

Example Response; When there is no user on the site with this code.

$ curl -i https://channel.me/api/cobrowse/start -d security_code=7622 -u email@example.com:FhdrRs34
HTTP/1.1 200 OK
Vary: Accept
Server: MochiWeb/1.1 WebZMachine/2.0 (Z) Zotonic/0.13
Date: Tue, 01 Apr 2014 13:13:49 GMT
Content-Type: application/json
Content-Length: 57

{"status":"error","reason":"Connection number not found"}

Stop a Session

curl -i https://channel.me/api/cobrowse/stop -d session_id=XTb1BspFQ7IsfQOfTOXhVMali -u email@example.com:FhdrRs34

Example Response.

$ curl -i https://channel.me/api/cobrowse/stop -d session_id=XTb1BspFQ7IsfQOfTOXhVMali -u email@example.com:FhdrRs34
HTTP/1.1 200 OK
Vary: Accept
Server: MochiWeb/1.1 WebZMachine/2.0 (Z) Zotonic/0.13
Date: Tue, 01 Apr 2014 13:13:49 GMT
Content-Type: application/json
Content-Length: 16 

{"status":"ok"}