Saturday, December 24, 2016

Comments Resources

DELETE comments/:comment_id


Delete a comment. Warning: the comment must have been posted by the logged in user.

Requires authentication

  • A valid access token must be provided in access_token parameter.

The access_token should be sent using an HTTP header like so:

 Authorization: Bearer access_token

An example call with CURL:

 curl -X DELETE --header "Authorization: Bearer jLJeOz8aEIsKtGSdXsqTDGxmtEduUGkZTVJBo3We"

Return format

A JSON object containing keys status and success.

  • status value: comment_deleted
  • success value: The comment #:comment_id was deleted.


All known errors cause the resource to return HTTP error code header together with a JSON array containing at least status and error keys describing the source of error.

  • 400 Bad Request — When the status key is comment_not_self.
  • 404 Not Found — When the status key is comment_not_found

error messages

  • If status is comment_not_found: The comment #:comment_id was not found..
  • If status is comment_not_self: The comment #:comment_id was not posted by user #:user_id..





   "success":"The comment #42 was deleted."


For an error with HTTP code 404:

   "error":"The comment #42 was not found."

Powered by Codex 1.1.0