Kevin Miller
Kevin Miller

Reputation: 30

Deeplinks created from branch API not opening App Store

I am attempting to create deeplinks via the branch API. When I create deeplinks via the dashboard, on an iOS device, they show the behavior I expect: they will open the AppStore if the app is not installed on the device. However when I create them via Branch's API they do not direct to the app store, they go directly to the fallbackURL. They also do not seem to include any of the custom data that I have included. Here is a sample of the JSON I am sending.

  "branch_key": "123456",
  "feature": "marketing",
  "channel": "onboarding",
  "data": {
    "$canonical_identifier": "1234",
    "$og_title": "Signup",    
    "$og_description": "Click this link",
    "$desktop_url": "http://mywebsite.com/create-account",
    "$fallback_url": "http://mywebsite.com/create-account",
    "user_id":"123456",
    "email": "[email protected]",
    "verification_code": "123456",
  }
}

I suspect that I am not sending some parameter that Branch expects, but I wasn't able to determine that from the documentation. Any help would be appreciated.

Upvotes: 0

Views: 403

Answers (2)

promit.dey
promit.dey

Reputation: 201

Please refer to the below Curl to create a deep link via the API :

curl -XPOST https://api2.branch.io/v1/url -H "Content-Type: application/json" \ -d '{ "branch_key": "key_live_xxxxxxxx", "channel": "facebook", "feature": "onboarding", "campaign": "new product", "stage": "new user", "tags": ["one", "two", "three"], "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" } } }'

Please recheck on your Branch live key while creating the same.

Also refer to our documentation here for further clarification : https://help.branch.io/developers-hub/docs/deep-linking-api

You can reach out to [email protected] to create a ticket so as to share the exact curl you are using to help us debug the issue.

Upvotes: 1

Devi Shetty
Devi Shetty

Reputation: 99

Have you tried setting $ios_url=path to App store? Ideally the default values from your dashboard configuration should be used, but if you want to explicitly set this value on links created through API you can use $ios_url and $android_url parameters.

Upvotes: 0

Related Questions