上传非视频素材 API

拥有此API的权限集
素材管理-上传

请求方式及url

  • 请求方式:POST
  • 请求头:Content-Type:application/json
  • 接口地址:https://api.xiaoe-tech.com/xe.material.open.api/material_cos_upload/1.0.0
  • 频率限制:10秒300次

在线调试工具

请求

响应

请求参数

参数名 必选 类型 说明
access_token string 专属token
url string 可访问资源链接
type string 资源类型,1-图片 2-音频 4-电子书 5-文档
title string 素材名称
material_property object 素材属性
material_property.length double 音频时长,仅上传音频时传
material_property.width int 图片宽度,仅上传图片时传
material_property. height int 图片高度,仅上传图片时传

请求示例

{
    "url": "http://wechatapppro-1252524126.file.myqcloud.com/appWcPjuhJH7408/audio/cmVzb3VyY2UtY291cnNlQXVkaW8tODIxNTc2NTU.mp3",
    "type": 1,
    "app_id": "testappid",
    "user_id": "pull_upload",
    "title": "test3",
    "material_property": {
        "length": 20.22,
        "width": 100,
        "height": 100
    }
}

返回参数

参数名 必选 类型 说明 备注
code int 返回码 0-成功,其他失败
msg string 返回信息 ...
data object 返回值 ...
data.material_id string 素材 id ...

返回示例

{
    "code": 0,
    "msg": "ok",
    "data": {
        "material_id": "m_qHiyuGQ0n1sBz_mfaulg4s"
    }
}

results matching ""

    No results matching ""