Skip to content
Christy Roys edited this page Sep 7, 2020 · 3 revisions

Introduction

  • all api endpoints returns data in JSON format.
  • Relative urls in the fields are relative to the base url.

Status Codes

Status codes returned by api includes:

  • 200 - Successfull.
  • 206 - Partial content.
  • 404 - Not found / No result.
  • 410 - Gone, message might be deleted.
  • 50x - Internal server error.

Endpoints

All the endpoints mentioned below are relative to the base url.

/api

  • Method : GET

  • Schema :

{
  "chats": [
    {
      "page_id": String,
      "name": String,
      "url": String
    },
  ]
}

/api/:page_id

  • Method : GET

  • Schema :

{
  "item_list": [
     {
       "file_id": Int,
       "media": Bool,
       "thumbnail": String,
       "mime_type": String,
       "insight": String,
       "date": String,
       "size": Int,
       "human_size": String,
       "url": String
     },
  ],
  "prev_page": Union([Bool, {"url": String, "no": Int}]),
  "cur_page": Int,
  "next_page": Union([Bool, {"url": String, "no": Int}]),
  "search": String,
  "name": String,
  "logo": String,
  "title": String
}
  • Parameters:
page: Page number.
search: Search query.

/api/:page_id/:file_id/view

  • Method : GET

  • Schema :

{
  "found": Bool,
  "name": String,
  "file_id": Int,
  "size": Int,
  "human_size": String,
  "media": Union([Bool, {
    "type": String,
    "image": Bool,
    "audio": Bool,
    "video": Bool
  }]),
  "caption_html": String,
  "caption": String,
  "title": String,
  "reply_btns": [
    [
      {
        "url": String,
        "text": String
      },
    ],
  ],
  "thumbnail": String,
  "download_url": String,
  "page_id": String
}
Clone this wiki locally