Comments API

Comments API

The Comments Bot Team

Comments Bot can help you to create posts on Telegram with comments.

We have launched the Comments API to give you an opportunity of creation new posts with comments on Telegram.


All queries to the Comments API must be served over HTTPS and should be presented in this form: https://api.comments.bot/%method%.

Methods

Available methods

We support HTTP methods. The response contains a JSON object, which always has a Boolean field ok. If ok equals true, the request was successful, and the result of the query can be found in the result field. In case of an unsuccessful request, ok equals false, and the error is explained in the error field (e.g. PARAM_SHORT_NAME_REQUIRED). All queries must be made using UTF-8.

createPost

Use this method to create a new post. On success, returns the post_id and link.

  • api_key (String)
    Required. API key. Send the command /api to @CommentsBot to get your API key.
  • owner_id (Integer)
    Required. Send the user_id of the creator of the post.
  • type (String)
    Required. Send the text or photo.
  • text (String, 0-4056 characters)
    Text of the post to be created.
  • photo_url (String)
    Send the url (e.g. https://telegra.ph/file/cc0f8dcef31b7ab923ef8.jpg) of the photo from telegra.ph. You need to upload your photo to telegra.ph/upload and send the link.
  • caption (String, 0-1024 characters)
    Photo caption.
  • parse_mode (String)
    Send Markdown or HTML.
  • administrators (String)
    Send user_ids separated by comma of users who will be deleted comments of the post.
  • disable_notifications (String)
    Send true if you want to disable notifications about new comments for all admins of the post.

editPost

Use this method to edit of post. On success, returns true.

  • api_key (String)
    Required. API key. Send the command /api to @CommentsBot to get your API key.
  • post_id (String)
    ID of the created post.
  • text (String, 0-4056 characters)
    Text of the post to be created.
  • photo_url (String)
    Send the url (e. g. https://telegra.ph/file/cc0f8dcef31b7ab923ef8.jpg) of the photo from telegra.ph. You need to upload your photo to telegra.ph/upload and send the link.
  • caption (String, 0-1024 characters)
    Photo caption.
  • parse_mode (String)
    Send Markdown or HTML.

deletePost

Use this method to delete a post. On success, returns true.

  • api_key (String)
    Required. API key. Send the command /api to @CommentsBot to get your API key.
  • post_id (String)
    ID of the created post.

Report Page