Send message Consulting with attached photo

Note:

  • For APIs used for Shop, the API key is: <api_key>. The base_url information of the Shop.

  • For APIs used for Partner, the API key is: <shop_key>. The base_url information of the Partner.

Request:

curl --location 'BASE_URL.Zalo/OASendImage' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API_KEY' \
--data '{
  "message": {
    "attachment_id": "string",
    "image_url": "string"
  },
  "oa_id": "string",
  "recipient": {
    "user_id": "string"
  }
}'

Response:

{
  "direction": "in",
  "msg_id": "string",
  "oa_id": "string",
  "recipient_id": "string",
  "sender_id": "string",
  "shop_id": "string",
  "type": "unknown",
  "user_id": "string",
  "zl_user_id": "string"
}

Request body structure

Parameters
Data type
Describe

attachment_id

string

Image ID, obtained using the upload API

image_url

string

Image URL

id

string

OA ID

user_id

string

Zalo User ID

Return data attribute structure

Parameters
Data type
Describe

direction

string (nzMessageDirection)

in out

msg_id

string

Notification ID

id

string

OA ID

recipient_id

string

Recipient ID

sender_id

string

Sender ID

shop_id

string

Shop ID on eTelecom

type

string (vqUIDType)

"unknown" "text" "audio" "video" "photo" "GIF" "link" "file" "sticker" "location" "business_card"

user_id

string

User ID on eTelecom

Last updated