接口说明
使用 HTTPS 请求头添加: Authorization: Bearer $AppKey
此 API 需要: AppKey
调用方式
对接口传参
- 请求方式:POST(HTTPS)
 - 请求地址:https://www.allapp.link/v3/deeplink/create
 
参数解释
请求包体:
{
    "project_id": "X5c6Zz8CeUcwim82YXtsh9",
    "template_id": "1054",
    "url_id": "myid",
    "title": "链接名称",
    "tag_name": ["标签1"],
    "user_id": "",
    "link_data": [
        {"key": "new_key", "value": "new_value"}
    ],
    "pre_domain": "",
    "redirections": {
        "android": {
            "use_custom": 1,
            "use_land": 1,
            "redirect_type": 2,
            "custom_url": "https://www.turbolink.ai"
        },
        "ios": {
            "use_custom": 1,
            "use_land": 1,
            "redirect_type": 2,
            "custom_url": "https://www.turbolink.ai/1"
        },
        "default": {
            "use_custom": 1,
            "custom_url": "https://www.turbolink.ai/2"
        },
         "web": {
            "use_custom": 1, 
            "web_first": 0,
            "pc_type": 2,
            "pc_custom_url": "https://www.turbolink.ai/1",
            "h5_type": 2,
            "h5_custom_url": "https://www.turbolink.ai/2"
        }
    },
    "share": {
        "title": "社媒标题",
        "desc": "社媒描述",
        "image": "https://img0.xxx.com/1.jpg"
    }
}参数说明:
| 参数 | 必须 | 类型 | 说明 | 
|---|---|---|---|
| project_id | 是 | string | 您的 Project ID | 
| template_id | 是 | string | 您的模板id | 
| url_id | 是 | string | 短链id(与返回的short_hash字段一致) | 
| title | 是 | string | 链接标题 | 
| tag_name | 否 | array(string) | 链接标签 | 
| user_id | 否 | string | 创建唯一链接标识,以此标识来确定链接的唯一。填写后这个用户就只创建唯一的链接了 | 
| link_data | 否 | array(object) | 深度链接自定义键值对 | 
| link_data.key | 否 | string | 自定义参数键 | 
| link_data.value | 否 | string | 自定义参数值 | 
| pre_domain | 否 | string | 链接附带域名前缀 | 
| redirections | 是 | object | 跳转配置 | 
| redirections.android | 否 | object | 安卓跳转配置 | 
| redirections.android.use_custom | 否 | int32 | 是否使用自定义配置(0-否 1-是) | 
| redirections.android.use_land | 否 | int32 | 当use_custom=1时使用,链接是否跳转到落地页(0-否 1-是) | 
| redirections.android.redirect_type | 否 | int32 | 当use_custom=1时使用,跳转方式(1-GooglePlay商店 2-自定义网址) | 
| redirections.android.custom_url | 否 | string | redirect_type=2时使用,自定义网址 | 
| redirections.ios | 否 | object | ios跳转配置 | 
| redirections.ios.use_custom | 否 | int32 | 是否使用自定义配置(0-否 1-是) | 
| redirections.ios.use_land | 否 | int32 | 当use_custom=1时使用,链接是否跳转到落地页(0-否 1-是) | 
| redirections.ios.redirect_type | 否 | int32 | 当use_custom=1时使用,跳转方式(1-AppStore 2-自定义网址) | 
| redirections.ios.custom_url | 否 | string | redirect_type=2时使用,自定义网址 | 
| redirections.default | 否 | object | 默认跳转配置 | 
| redirections.default.use_custom | 否 | int32 | 是否使用自定义配置(0-否 1-是) | 
| redirections.default.custom_url | 否 | string | 当use_custom=1时使用,自定义默认跳转地址 | 
| redirections.web | 否 | object | Web跳转配置 | 
| redirections.web.use_custom | 否 | int32 | 是否使用自定义配置(0-否 1-是) | 
| redirections.web.web_first | 否 | int32 | 是否优先web跳转(0否 1是) | 
| redirections.web.pc_type | 否 | int32 | pc端选择(1使用默认网址 2使用自定义) | 
| redirections.web.pc_custom_url | 否 | int32 | pc端自定义网址,当pc端选择为2时使用 | 
| redirections.web.h5_type | 否 | int32 | h5端选择(1使用默认网址 2使用自定义) | 
| redirections.web.h5_custom_url | 否 | int32 | h5端自定义网址,当h5端选择为2时使用 | 
| share | 否 | object | 社媒分享配置 | 
| share.title | 否 | string | 社媒分享标题 | 
| share.desc | 否 | string | 社媒分享描述 | 
| share.image | 否 | string | 社媒分享缩略图 | 
返回结果
{
    "code": 200,
    "msg": "请求成功",
    "data": {
        "link_template": "1054",
        "short_hash": "myid",
        "link_url": "https://test.allapp.link/1054/myid"
    }
}参数说明:
| 参数 | 类型 | 说明 | 
|---|---|---|
| code | int32 | 操作结果代码, 200 - 成功 | 
| msg | String | code 非 200 时为错误信息 | 
| data | obj | 如有数据,则返回 | 
| data.link_template | String | 链接模板id | 
| data.short_hash | String | 链接短链hash | 
| data.link_url | String | 完整链接地址 |