Survey entry link
Survey entry link is generated on inBrain side and returned as part of Fetch top surveys for user API endpoint response.
- Used to load the survey for the particular user
- Returned link has hash signature applied and is supposed to be used without modification
- Optionally, the link can be extended by partner by appending
mid
query parameter
Although the partner does not need to be fully aware of how entry link is constructed, the link template and correspondent parameters are given below for full transparency.
Template
https://surveys.inbrain.ai/supplier-surveys/{surveyId}?sid={sid}&userId={userId}&placementId={placementId}&mid={mid}&hash={hash}
Parameters
Parameter | Source | Description | Required |
---|---|---|---|
surveyId | path | Id of the survey | true |
sid | query | Id of the partner | true |
userId | query | Id of the user | true |
placementId | query | Id of the placement. The same value passed to Fetch top surveys for user API endpoint, if any. | false |
mid | query | Parameter that can be used for partner specific data - The value of this parameter is returned back to the partner in redirect links and S2S callbacks - Accepts only alphanumeric characters + underscore and dash | false |
hash | query | Hash signature to prevent unauthorized use and link manipulation by third parties | true |
Example
https://surveys.inbrain.ai/supplier-surveys/Q2ltdWxh?sid=17&userId=someApiUserId&placementId=0ddd2bb1-8f2e-4e95-a449-61deeaca37ed&hash=dace7b8f74d5c0deed7bb6d9388114df0ccbfa684924328913677ab496486c95
Entry link signature
As stated above, the survey entry links returned in the response of Fetch top surveys for user API endpoint already have a hash signature applied for ease of use. That hash signature on the link is applied on the inBrain side following the Link signing process.
Entry link modification
The partner has the ability to modify the returned survey entry link to pass extra parameters like mid
to inBrain. In such case, the partner is responsible for signing the modified entry link before letting the user open the survey using that specific link. The actions needed to append extra parameters on the entry link and re-sign it are given below.
- Remove the hash signature parameter from the link
- Append extra parameters to the unsigned link
- Apply hash signature on the modified link following the Link signing process
The mid
parameter is the only extra parameter supported currently, but please note that in future versions inBrain may introduce additional parameters.