Documentation
Comments synchronization

The HyperComments system allows to synchronize comments with your website. It means that all the comments posted by HyperComments system will be stored in your database.

To synchronize comments you need to:

  1. In administrative section of your website"Settings" -> "API settings" enter the "Secret key" (For Wordpress users the secret key is generated automatically with plugin activation and it is impossible to edit it).
  2. Enter into Notify URL field URL address where the HyperComments system will send data packages about events that occur in the system
  3. Put a checkmark in the events that you want to come to you for processing

The data packages need to be sent by HTTP and HTTPS protocols with POST method to specified Notify URL.

Option Value Description
data String Events array in JSON format. For example:
[{"cmd":"streamRemoveMessage","stream_id":"4fead3466bf6ab60f8000019", widget_id:2, id:"1367864629082801"}]
        
time int unixtime of data package sending time
signature String Signature is created as md5 hash from the joint strings "Secret key"+"data option"+"Time" :
md5(SECRETKEY+data+time)
Example of creation signature on PHP:
$signature = md5($secret_key.$data.$time))
data packages description

New message:

Option Value Description
cmd string data package name streamMessage
stream_id string page ID
widget_id int widget ID
text string comment text
acc_id int commentator's ID in HyperComments system
nick string commentator's nickname
email string commentator's email
id string message ID
parent_id string parrent's message ID
root_id string message ID of root branch
files string Attached files in JSON format
ip string commentator's ip
user_id string user's ID in your system (when SSO)
parent_user_id string ID of user's parent message in your system (when SSO)
category int Category of comment
link string page url where comment was left
xid string page ID if xid parameter was passed in a widget code

Edited message:

Option Value Description
cmd string data package name streamEditMessage
stream_id string country ID
widget_id int widget ID
id string message ID
text string comment text
link string page url where comment was left
xid string page ID if xid parameter was passed in a widget code

Removed message:

Option Value Description
cmd string data package name streamRemoveMessage
stream_id string page ID
widget_id int widget ID
id string message ID
link string page url where comment was left
xid string page ID if xid parameter was passed in a widget code