Latest stories

get_messages

  • Inputs
{
    "chat_id": "string: excludes phone_number, user_name, user_id",
    "comment": "integer: id of message that you want to read its comments: optional",
    "media_type": "integer: type of media:optional",
    "message_id": "integer: id of message that you want read it. has dependency to page: optional",
    "page": "string: allowed:'next','prev','medd' or 'self' has dependency to message_id: optional",
    "phone_number": "phone number: example: +18885559977: excludes user_name, user_id, chat_id",
    "user_id": "integer: excludes phone_number, user_name, chat_id",
    "user_name": "string: excludes phone_number, chat_id, user_id"
}

  • Errors
{
    "must_login": "user must be login",
    "null value not allowed": "invalid phone number",
    "phone_number_does_not_exist": "there is no account assigned to this phone number",
    "user_is_not_in_the_chat": "user is not member of this chat"
}

  • Extra Description
Returns messages specified by input parameter

  • Sample
  • Url:
https://api.pantel.me/a/get_messages?phone_number=+1********
  • Output:
                                {
    "chat_id": "010620b7ea7fc9f27760e822161ef35fa947",
    "replied_result": [],
    "result": [
        {
            "body": "some string as message",
            "bot_callback": false,
            "counter": 0,
            "date": 1547471282.2416818,
            "duration": null,
            "edit_date": null,
            "forwarded_from_account_id": null,
            "forwarded_from_account_name": null,
            "forwarded_from_chat_id": null,
            "forwarded_from_chat_type": null,
            "forwarded_from_message_id": null,
            "is_comment": 0,
            "liked": 0,
            "likes": 0,
            "local_id": "_5344165367713543",
            "media": null,
            "media_dataurl": null,
            "media_path": null,
            "media_real_name": null,
            "media_server_id": null,
            "media_size": null,
            "media_type": 0,
            "message_id": 1547471282240364,
            "og_data": null,
            "parent_message": null,
            "public_sticker_album_id": null,
            "reply_markup": null,
            "seen": 2,
            "sender": 1000013,
            "sender_contact_name": "new_username",
            "sender_first_name": "M",
            "sender_image_path": null,
            "sender_image_server_id": null,
            "sender_last_name": "new_user",
            "size": null,
            "type": 1
        },
        {
            "body": "",
            "bot_callback": false,
            "counter": 0,
            "date": 1547471267.7525873,
            "duration": null,
            "edit_date": null,
            "forwarded_from_account_id": null,
            "forwarded_from_account_name": null,
            "forwarded_from_chat_id": null,
            "forwarded_from_chat_type": null,
            "forwarded_from_message_id": null,
            "is_comment": 0,
            "liked": 0,
            "likes": 0,
            "local_id": "_05361935828178788",
            "media": "fe10afb275f86b9a863a7b9f360d0d695",
            "media_dataurl": null,
            "media_path": "c/3/f/4/1/23dc7a046d164166e507b060e55/fe10afb275f86b9a863a7b9f360d0d695.jpg",
            "media_real_name": "somefile.jpg",
            "media_server_id": 1,
            "media_size": null,
            "media_type": 3,
            "message_id": 1547471267750580,
            "og_data": null,
            "parent_message": null,
            "public_sticker_album_id": null,
            "reply_markup": null,
            "seen": 2,
            "sender": 1000013,
            "sender_contact_name": "new_username",
            "sender_first_name": "M",
            "sender_image_path": null,
            "sender_image_server_id": null,
            "sender_last_name": "new_user",
            "size": 163476,
            "type": 2
        },
        {
            "body": "some string as message",
            "bot_callback": false,
            "counter": 0,
            "date": 1545717032.0002568,
            "duration": null,
            "edit_date": null,
            "forwarded_from_account_id": null,
            "forwarded_from_account_name": null,
            "forwarded_from_chat_id": null,
            "forwarded_from_chat_type": null,
            "forwarded_from_message_id": null,
            "is_comment": 0,
            "liked": 0,
            "likes": 0,
            "local_id": "_3911828138870792",
            "media": "ia8a102fcf80a3f2e3503013427ba49f0",
            "media_dataurl": "data:image/.jpg;base64,/9j/4AAQSkZJRgABAQIAJQAlAAD/2wBDABsSFBcUERsXFhceHBsgKEIrKCUlKFE6PTBCYFVlZF9VXVtqeJmBanGQc1tdhbWGkJ6jq62rZ4C8ybqmx5moq6T/2wBDARweHigjKE4rK06kbl1upKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKT/wAARCAAoADIDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQBAgMF/8QAIBABAQABAwUBAQAAAAAAAAAAAAECAyExBBESFGETQf/EABcBAAMBAAAAAAAAAAAAAAAAAAABAgP/xAAXEQEBAQEAAAAAAAAAAAAAAAAAAREC/9oADAMBAAIRAxEAPwDmJkRGmMayCK+KLG3irlFXlWKY8nOn5hSTc30/LKpp6cATgETiSNMVpp1aYVpzRKIrk08ai4Vdq9ZSbmunm7Kad7mdDDdlU0zOAvMdgki/r/E+v8AUQ/D4PX+ADTTOn+N9LR7fwAgY/MAEH//Z",
            "media_path": "b/f/7/d/0/40447d18b6d5d2e87f64fe2cf89/ia8a102fcf80a3f2e3503013427ba49f0.png",
            "media_real_name": "pantel icon.png",
            "media_server_id": 1,
            "media_size": "50x40",
            "media_type": 2,
            "message_id": 1545717031999010,
            "og_data": null,
            "parent_message": null,
            "public_sticker_album_id": null,
            "reply_markup": null,
            "seen": 2,
            "sender": 1000013,
            "sender_contact_name": "new_username",
            "sender_first_name": "M",
            "sender_image_path": null,
            "sender_image_server_id": null,
            "sender_last_name": "new_user",
            "size": 1356,
            "type": 2
        }
    ],
    "status": "success",
    "time": 1547561424.6113613,
    "users_typing_status": null
}