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
| Properties | Type | Description |
|---|---|---|
| conversation_id Required | string | conversation_id |
Header
| Properties | Type | Description |
|---|---|---|
| content-type Required | string | Loại được phép: application/json |
| x-tts-access-token Required | string | Giá 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
| Properties | Type | Description |
|---|---|---|
| app_key Required | string | Mỗ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 Required | string | Chữ 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 Required | int | Unix 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 Required | string | Sử 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
| Properties | Type | Description |
|---|---|---|
| msg_type Required | string | Loại tin nhắn, với các giá trị có thể:- TEXT- PRODUCT_CARD- TARGET_ COLLABORATION_CARD- FREE_SAMPLE_CARD- IMAGE |
| content Required | string | Nộ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
| Properties | Type | Description |
|---|---|---|
| code | int | Mã trạng thái thành công hoặc thất bại được trả về trong phản hồi API. |
| message | string | Thô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_id | string | Nhật ký yêu cầu |
| data | object | Thô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