📢 Channels

Preview channel messages

You can use either invite code (https://www.whatsapp.com/channel/123) or (123)ORChannel ID (123@newsletter).

get/api/{session}/channels/{id}/messages/preview

Request

  • Base URL: http://localhost:3000
  • URL: http://localhost:3000/api/{session}/channels/{id}/messages/preview
  • Auth: API key in header X-Api-Key

Path parameters

sessionstring required

Session name

idstring required

Channel id or invite code

Query parameters

downloadMediaMimetypesstring[]

Download only media with these mimetypes (prefix match)

downloadMediaboolean required
limitnumber required

Response

reactionsobject required
viewCountnumber required

Example response

[
  {
    "reactions": {
      "👍": 10,
      "❤️": 5
    },
    "message": {
      "id": "false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA",
      "timestamp": 1666943582,
      "from": "11111111111@c.us",
      "source": "api",
      "to": "11111111111@c.us",
      "media": {
        "url": "http://localhost:3000/api/files/false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA.oga",
        "mimetype": "audio/jpeg",
        "filename": "example.pdf",
        "s3": {
          "Bucket": "my-bucket",
          "Key": "default/false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA.oga"
        }
      },
      "mediaUrl": "http://localhost:3000/api/files/false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA.oga",
      "replyTo": {
        "id": "AAAAAAAAAAAAAAAAAAAA",
        "participant": "11111111111@c.us",
        "body": "Hello!",
        "media": {
          "url": "http://localhost:3000/api/files/false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA.oga",
          "mimetype": "audio/jpeg",
          "filename": "example.pdf",
          "s3": {
            "Bucket": "my-bucket",
            "Key": "default/false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA.oga"
          }
        }
      }
    }
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.