【问题标题】:Creating Quick Links using the Branch HTTP API?使用 Branch HTTP API 创建快速链接?
【发布时间】:2018-09-04 10:32:57
【问题描述】:

使用 Branch.io HTTP API 创建的链接不会在 Branch 门户中显示为快速链接。快速链接很方便,因为它们在一个视图中显示“点击”、“打开”等内容

创建链接的API:link-create

有谁知道这是否可行?

【问题讨论】:

    标签: branch.io


    【解决方案1】:

    默认情况下,通过 API 和 SDK 创建的链接不会在分支仪表板上显示为快速链接。

    如果您希望它们在分支仪表板上显示为快速链接,请将type=2 添加到负载根目录,并将$marketing_title="some text" 添加到请求负载上的数据对象。

    例如:

    curl -XPOST https://api.branch.io/v1/url \
      -d '{
      "branch_key": "key_live_kaFuWw8WvY7yn1d9yYiP8gokwqjV0Swt",
      "channel": "facebook",
      "feature": "onboarding",
      "campaign": "new product",
      "stage": "new user",
      "tags": ["one", "two", "three"],
      "type": 2,
      "data": {
        "$canonical_identifier": "content/123",
        "$og_title": "Title from Deep Link",
        "$og_description": "Description from Deep Link",
        "$og_image_url": "http://www.lorempixel.com/400/400/",
        "$desktop_url": "http://www.example.com",
        "custom_boolean": true,
        "custom_integer": 1243,
        "custom_string": "everything",
        "custom_array": [1,2,3,4,5,6],
        "custom_object": { "random": "dictionary" },
        "$marketing_title": "Some marketing title"
      }
    }'
    

    【讨论】:

    • 我无法让它工作。使用我的“branch_key”将此确切的有效负载发送到 Branch.io 会在“设置和测试”->“LiveView”->“链接”中创建链接,但它不会显示在“快速链接”中。我已经测试了我的“live”和“test”分支键。是否需要任何其他配置才能完成这项工作?
    • 显然,“type”属性需要在根而不是数据对象上,才能将链接创建为快速链接。
    • 我不明白为什么创建端点不需要 branch_secret。例如,branch_key 暴露在移动应用程序中,您将如何防止有人在您的系统内创建不需要的快速链接
    • 我遇到“您无权访问此类型。请使用类型 0(默认)或 1 重试。”当我添加 type=2
    猜你喜欢
    • 2023-04-10
    • 2011-04-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多