Comments‎ > ‎

bluemelon.comments.add

adds a new comment to the specified item, user or blog post

Authentication:

Yes (see here for details)

Arguments:

(required) string : body - represents the text of the new comment
(optional) int: itemid - if set, the comment will be assigned to the specified item
(optional) int: userid - if set, the comment will be assigned to the user's guestbook
(optional) int: blogpostid - if set, the comment will be assigned to the specified blog post
(optional) string : nickname - this must be set if the commenting user is not authorized
(optional) string : captcha - this must be set if the commenting user is not authorized
(required) string : publickey - the public key of an application
(required) string : token - the access token

Request Example:

http://www.bluemelon.com/api/rest/{api_sing}/
?method=bluemelon.comments.add&itemid=103&body=xxx&nickname=xxx&captcha=xxx&publickey={publickey}&token={token}

Response Example:

<rsp status="ok" onrequest="bluemelon.comments.add">
<content>
<comment>
<id>103</id>
<entityType>ITEM</entityType>
<entityId>xxx</entityId>
<userId>xxx</userId>
<nickname>xxx</nickname>
<body>xxx</body>
<date>2009-04-16 13:45:08.78 CEST</date>
<unread>false</unread>
</comment>
</content>
</rsp>

Error Codes:

4 - "Missing parameter"
5 - "Invalid parameter"
10 - "Folder not found"
11 - "Item not found"
12 - "Application not found"
14 - "Invalid accessToken"
16 - "Access token timed out.You must relogin."
17 - "Invalid call signature size"
18 - "Invalid call signature"
20 - "Missing api_sign"
24 - "Entered CAPTCHA code is not correct"
26 - "Comments disallowed by owner"
602 - "No read permissions"
603 - "Account recently expired or deleted"

Comments