Chúng tôi sẽ ngừng cung cấp API Tại chỗ. Hãy tham khảo tài liệu về việc Ngừng cung cấp API Tại chỗ để biết chi tiết, đồng thời tìm hiểu cách chuyển sang API Đám mây thế hệ tiếp theo của chúng tôi.

Sticker

/v1/stickerpacks/{stickerpack-id}/sticker

Retrieving Stickers

First-Party Stickers

Use this request to retrieve stickers from a given stickerpack:

GET /v1/stickerpacks/stickerpack-id/stickers?namespace=whatsapp

The response looks like this:

{
  "stickers": [
    {"index": "sticker-index1"},
    {"index": "sticker-index2"}
  ]
}

Third-Party Stickers

Use this request to retrieve stickers from a given stickerpack:

GET /v1/stickerpacks/stickerpack-id/stickers

The response looks like this:

{
  "stickers": [
    {"index": "sticker-index1"},
    {"index": "sticker-index2"}
  ]
}

Retrieving Sticker Information

First-Party Sticker

Request:

GET /v1/stickerpacks/stickerpack-id/stickers/sticker-index?namespace=whatsapp

The response looks like this:

{
  "stickers": [
    {
      "id": "sticker-media-id" # ex: b942a4d1-4e1d-4c56-8cfa-a848b8222061
      "emojis": ["🐥", "😃"],
    }
  ]
}

Third-Party Sticker

Request:

GET /v1/stickerpacks/stickerpack-id/stickers/your-sticker-index

The response looks like this:

{
  "stickers": [
    {
      "id": "sticker-media-id" # ex: b942a4d1-4e1d-4c56-8cfa-a848b8222061
      "emojis": ["🐥", "😃"],
      "image_data_id" : "sticker-image-media-id",
    }
  ]
}

Creating

Third-Party Stickers

Use the following request to create stickers:

POST /v1/stickerpacks/stickerpack-id/stickers
{
  "image_data_id" : "your-sticker-image-media-id",
  "emojis": ["🐥", "😃"]
}

The response looks like this:

{
  "stickers": [{
    "index": "sticker-index"
  }]
}

Parameters

NameDescription

image_data_id

Required.

The ID for the sticker media.

emojis

Optional.

An array of the emojis included in the stickerpack.

Updating

Third-Party Stickers

Use the following request to update a specific sticker:

PATCH /v1/stickerpacks/your-sticker-pack-id/stickers/your-sticker-index
{
  "image_data_id" : "your-sticker-image-media-id",
  "emojis": ["🐥", "😃"],
}

A successful response will show 200 OK and either null or {}.

Parameters

NameDescription

image_data_id

Optional.

The ID for the sticker media.

emojis

Optional.

An array of the emojis included in the stickerpack.

Deleting

Third-Party Stickers

Use the following request to delete a specific sticker:

DELETE /v1/stickerpacks/your-sticker-pack-id/stickers/your-sticker-index

Response

A successful response will show 200 OK and either null or {}.