无法使用branch.io API更新branch.io链接

时间:2018-12-12 08:32:21

标签: branch.io

更新现有分支链接时遇到问题。 以下是我的要求:

{
    "uri": "https://api.branch.io/v1/url/?url=https://example.in/xawwaqse&branch_key=key_live_branchKey",
    "headers": {
        "Content-Type": "application/json"
    },
    "json": true,
    "method": "PUT",
    "body": {
        "data": {
            "slug": "test-slug",
            "type": "collection",
            "$desktop_url": "https://www.example.com/test-slug/",
            "$android_url": "https://www.example.com/test-slug/",
            "$ios_url": "https://www.example.com/test-slug/",
            "$og_image_url": "imageUrl",
            "$og_title": "Collection by test | example",
            "$og_description": "Description",
            "$canonicalUrl": "https://www.example.com/test-slug/"
        },
        "branch_key": "key_live_branchKey",
        "branch_secret": "secret_live_branchKey"
    }
}

作为响应,得到以下错误消息:

"error": {
    "code": 500,
    "message": "The conditional request failed (Service: null; Status Code: 400; Error Code: ConditionalCheckFailedException; Request ID: OL3HPGV2UBBVV4KQNSO5AEMVJF66Q9ASUAAJGFSKS4MH0242JIJD)"
}

1 个答案:

答案 0 :(得分:0)

以下是有关此请求的一些提示:  1.使用documentation中提到的更新的v2 API  2.将https://example.in/xawwaqs替换为有效的网址,即您想吃的网址链接  3.用您的分支仪表板中的有效值替换key_live_branchKey  4.用Branch Dashboard中的有效值替换secret_live_branchKey  5.用有效的网址替换https://www.example.com/test-slug/

如有任何其他疑问,请随时使用更新的cURL写信给integration@branch.io。