I am using https://github.com/BranchMetrics/branch-deep-linking-public-api to create a branch link
for my users.
I am able to create link successfully which also works fine. But my link is missing one major data which is Branch Identity ID. This is the Branch ID
associated with individual identities on Branch
I also understood that if I pass value in $identity_id
tag while creating link then I will be able to see Branch Identity ID with my link. But I don't know how to access this id.
Here is my code.
const sendBranchRequest = params => {
const { path, body, qs, method } = params;
const options = {
method
, uri: `${ baseUrl }/${ path }`
, headers: {
"Content-Type": "application/json"
, "Cache-Control": "no-cache"
}
, json: true
};
if ( body ) {
options.body = body
options.body.branch_key = branchKey;
options.body.branch_secret = branchSecret;
}
return rp( options );
};
const createLink = data => {
const params = {
body: { data }
, method: 'POST'
, path: 'url'
};
return sendBranchRequest( params );
};
Thanks in advance.
The Branch Identity ID is an internal Branch user identifier, associated with each user. You will not be able to use the Branch Identity ID directly to create links.
You can instead try to create Branch links using Branch Developer Identity i.e. a custom identity you can use to track/identify your users.
Here is a sample curl:
Once, you create a link with the identity, if there is no identity_id (Branch Identity ID) associated with the identity, we'll create a new one (otherwise tie it to an existing identity_id).