Send message Consulting attached file

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/OASendFile' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API_KEY' \
--data '{
  "message": {
    "token": "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

token

string

File token obtained when using file upload API

id

int64

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