阿里卖家APP插件销售助手发送文件
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
file_info | NodeDTO | 必须 | 文件信息 | ||||||||
|
|||||||||||
scene_dto | SceneDTO | 必须 | 上传的基本逻辑信息封装,当前用户id 和类型 必须制定,这个必须要有 | ||||||||
|
|||||||||||
params | String | 必须 | {"source":"","needCardUrl":true} | 额外字段,如果有特殊需求,用于填入特殊字段内容 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
result | ApiResult | 返回结果 | |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); AlibabaInteractionImAssistantFileSendRequest req = new AlibabaInteractionImAssistantFileSendRequest(); AlibabaInteractionImAssistantFileSendRequest.NodeDTO obj1 = new AlibabaInteractionImAssistantFileSendRequest.NodeDTO(); obj1.setFileName( "test.mp4" ); obj1.setFileSize(7546310L); obj1.setMaterialType( "mp4" ); obj1.setMd5( "4a97dfe2e74071fe997a05e44db92e12" ); req.setFileInfo(obj1); AlibabaInteractionImAssistantFileSendRequest.SceneDTO obj2 = new AlibabaInteractionImAssistantFileSendRequest.SceneDTO(); obj2.setSceneType(1L); obj2.setFromAccountId( "111" ); obj2.setToAccountId( "222" ); obj2.setIdType(3L); req.setSceneDto(obj2); req.setParams( "{\"source\":\"\",\"needCardUrl\":true}" ); AlibabaInteractionImAssistantFileSendResponse rsp = client.execute(req); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | < alibaba_interaction_im_assistant_file_send_response > < result > < success >true</ success > < code >200</ code > < msg >系统错误</ msg > < ext_msg >{"code":100,"msg":"系统错误"}</ ext_msg > < data > < id >2395872215</ id > < parent_id >1410129110</ parent_id > < gmt_create >2024-03-19 23:15:46</ gmt_create > < gmt_modified >2024-03-19 23:15:46</ gmt_modified > < gmt_modified_long >1710915346000</ gmt_modified_long > < node_name >卡比.jpg</ node_name > < node_size >98142</ node_size > < node_type >file</ node_type > < material_type >jpg</ material_type > < bucket >hz-icbuim-file</ bucket > < md5 >39de172192ac999928cb7281a002b07b</ md5 > < oss_key >file/39de172192ac999928cb7281a002b07b.jpg</ oss_key > < thumbnail_url >https://clouddisk.alibaba.com/file/videoThumb.htm?appkey=OneChat&id=2395872215&parentId=1410129110&secOperateAliId=MC1IDX1PdpBbUR4ZAdxk7EoU5xolGUK0AvxyRHINIaffaPTN9ys-tFJfkgK3hqTdUIn9Bsn&scene=1</ thumbnail_url > < redirect_file_url >https://clouddisk.alibaba.com/file/redirectFileUrl.htm?appkey=OneChat&id=2395872215&parentId=1410129110&secOperateAliId=MC1IDX1antcSTkb4vXpGol-w4lniwSuaJyPVfJl2I9X2ama_xpUGdBRwbj4GnoToC5WXknk&fileAction=imagePreview&scene=1</ redirect_file_url > < source >hz</ source > < view_status >0</ view_status > < extend > < private_chat_name >OneChat|2207670947568|2207975307058</ private_chat_name > < creator >2207975307058</ creator > </ extend > < gmt_create_long >1710915346000</ gmt_create_long > </ data > </ result > </ alibaba_interaction_im_assistant_file_send_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|