Connector - Email to Comment
"Email to comment" functionality provides the ability to comment in HiveSocial automatically. Emails that needs to be posted, are sent to a predefined mailbox. The system checks them, if they are sent from emails that belong to registered accounts and if they have the permission to comment. Than if all checks out, the system gets the email subject, which needs to be in a special format. It needs to be the permalink of the post that you want to comment (http://domain.com/home/81368) or the permalink of the comment you want to reply to (http://domain.com/home/81368#116162). If such post or comment exists, the email body is posted as the comment content.
This configuration is applied for all groups in this system.
Method: get
Authorization is required.
Request
HTTP request
GET https://<YOUR_DOMAIN>/api/v1/en_US/connector/email-to-comment/{groupId}
Parameters
property | value | description |
---|---|---|
groupId | guid | The group ID for which you want to review the Email to Post settings. |
Request body
Do not supply a request body with this method.
Response
If successful, this method returns a response JSON with the following structure:
{ "success": true, "message": "Nisi proident tempor cillum sint duis eu elit dolor Lorem amet qui officia occaecat.", "timestamp": "2014-03-03T23:20:23Z", "errors": [], "object": { "type": "connectorEmailToComment", "serverName": "pop.mydomain.com", "serverPort": 25, "serverUsername": "joe@joe.com", "serverPassword": "password", "isEnabled": true, "isSSL": false, "deleteProcessed": true, "lastProcessed": "2014-03-03T23:20:23Z", "accessWarnings": [] } }
The general response properties are described on the Response format page. Here are the list of the specific properties for this method.
property | value | description |
---|---|---|
serverName | string | URL and address of the POP3 server |
serverPort | integer | The pop3 server post |
serverUsername | string | the pop3 access account username |
serverPassword | string | the pop3 access account password |
isEnabled | boolean | is this connector enabled |
isSSL | boolean | whether the use of SSL protocol is required by the email server. |
deleteProcessed | boolean | whether to clear the processed emails from the mailbox |
lastProcessed | date | when the operation was last run by the system in UTC time zone |
Method: update
Authorization is required.
Request
HTTP request
PUT https://<YOUR_DOMAIN>/api/v1/en_US/connector/email-to-comment
Parameters
Do not supply a request parameters with this method.
Request body
property | value | description |
---|---|---|
serverName | string | URL and address of the POP3 server |
serverPort | integer | The pop3 server post |
serverUsername | string | the pop3 access account username |
serverPassword | string | the pop3 access account password |
isEnabled | boolean | is this connector enabled |
isSSL | boolean | whether the use of SSL protocol is required by the email server. |
deleteProcessed | boolean | whether to clear the processed emails from the mailbox |
Response
If successful, this method returns a response JSON with the following structure:
{ "timestamp": "2014-03-03T23:20:23Z", "success": true, "message": "Aliqua anim consequat amet cupidatat proident amet amet.", "errors":[ { "key":"serverName", "value":"", "message": "Name cannot be blank" }], "object": { "type": "connectorEmailToComment", "serverName": "pop.mydomain.com11", "serverPort": 25, "serverUsername": "joe@joe.com", "serverPassword": "password", "isEnabled": false, "isSSL": false, "deleteProcessed": true, "lastProcessed": "2014-03-03T23:20:23Z", "accessWarnings": [] } }
The general response properties are described on the Response format page. Here are the list of the specific properties for this method.
property | value | description |
---|---|---|
success | Boolean | Whether the requested operation is successful or not |
message | String | Human readable error information |
errors | List (object) | List of validation errors, if any. The "key" property value is matched to one of the record's fields |
object | object | The object that caused the validation errors or that was updated. Have in mind that, if the server requires string trimming or data manipulation after the user submission, it is applied in this object. In this way the returned object can differe from the posted one. |