Chuyển tới nội dung chính

POST Send IM Message

Gửi tin nhắn IM Shop Scope bắt buộc: seller.affiliate_messages.write API để gửi tin nhắn IM. Phiên bản 202412

POST/affiliate_seller/202412/conversations/{conversation_id}/messages

Request

Path

PropertiesTypeDescription
conversation_id Requiredstringconversation_id

Header

PropertiesTypeDescription
content-type RequiredstringLoại được phép: application/json
x-tts-access-token RequiredstringGiá trị access_token của seller từ Get Access Token, khi user_type = 0. Làm theo hướng dẫn này để lấy access_token của seller.

Query

PropertiesTypeDescription
app_key RequiredstringMỗi app sẽ có một key duy nhất. Vui lòng sử dụng key cụ thể được gán cho app của bạn.
sign RequiredstringChữ ký được tạo bởi thuật toán gen. Khi bạn gửi yêu cầu API đến TTS, bạn phải ký chúng để TTS có thể nhận diện người gửi.
timestamp RequiredintUnix timestamp GMT (UTC+00:00). Timestamp này được sử dụng trên tất cả các yêu cầu API. Nhà phát triển có thể dùng nó để chuyển đổi sang giờ địa phương.
shop_cipher RequiredstringSử dụng thuộc tính này để truyền thông tin shop khi gọi API. Việc không truyền giá trị chính xác khi gọi API cho các shop xuyên biên giới sẽ trả về phản hồi không chính xác. Lấy bằng API Get Authorization Shop

Body

PropertiesTypeDescription
msg_type RequiredstringLoại tin nhắn, với các giá trị có thể:- TEXT- PRODUCT_CARD- TARGET_ COLLABORATION_CARD- FREE_SAMPLE_CARD- IMAGE
content RequiredstringNội dung tin nhắn, ở dạng chuỗi JSON serialized.Ví dụ:- TEXT:{"content": "simple text"}- PRODUCT_CARD:{"product_id": "12345"}- TARGET_ COLLABORATION_CARD{"target_collaboration_id": "1234"}- FREE_SAMPLE_CARD{"apply_id": "1234"}IMAGE{ "url":"https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/2ca53c34ad8443e6b39f4e0153d3aed4~tplv-o3syd03w52-origin-image.image?from=1320446476", "width": 1280, "height": 720}Lưu ý: Bạn có thể lấy giá trị của url bằng cách gọi Upload Messages Image.target_collaboration_id là Invitation group id.

Example

CurlGoNode.jsJavaEnable word wrap

Response Parameters

PropertiesTypeDescription
codeintMã trạng thái thành công hoặc thất bại được trả về trong phản hồi API.
messagestringThông báo thành công hoặc thất bại được trả về trong phản hồi API. Lý do thất bại sẽ được mô tả trong thông báo.
request_idstringNhật ký yêu cầu
dataobjectThông tin trả về cụ thể

Example

JSONEnable word wrap

Error Code

Xem các mã lỗi phổ biến

| Code | Message | | --- | --- | | 16030100 | Shop has reached IM send message quota with this creator | | 16030101 | Seller account is abnormal or you can't contact this creator because shop level didn't meet the GMV requirement. | | 16032001 | nvalid parameter Creator and Seller, please ensure Region mismatch. | | 45101004 | The query quota has been reached (10000 request per day). Please try again tomorrow. | | 36009003 | Internal error. Please try again. If the issue persists after multiple attempts, please contact platform support. |

Nội dung này có hữu ích không?Hữu ích

Không hữu ích

PreviousNext