Is there any SDK for golang to gererate branch link dyncmically?

630 Views Asked by At

I need to dynamically generate deep links with few embedded parameters using branch.io in a golang project. That link will be sent to android phones as a SMS. So that invite referral link redirects to the play store app. Is there any go lang SDK or any way another way to generate referral link dynamically?

1

There are 1 best solutions below

1
On

Currently, there is no library/wrapper support for GoLang specifically. However, you can make use of the Deep Linking API to achieve your use case.

Sample cURL -

curl -XPOST https://api2.branch.io/v1/url -H "Content-Type: application/json" \
-d '{
"branch_key": "key_live_xxxxxxxxx",
"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" }
 }
}'