#
Encrypted Invite Link
In case you don't want to expose the target URL or other parameters to the respondent, you can use an encrypted invite link. Invite links can be generated with the Verify API.
Parameter Transformation
Encrypted parameters are changed to be lowercase (keys and values) and the order of the parameters is not preserved.
#
API Endpoints
The API endpoints are segmented by region as follows:
- EU: https://verify-api-eu.realeyesit.com/index.html
- US: https://verify-api-us.realeyesit.com/index.html
- SG: https://verify-api-sg.realeyesit.com/index.html
#
Request
The request method is POST /api/v1/redirect/generate-invite-link.
#
Authorization Header
X-Api-Key: Account API-Key
The API Key is available in the Developers Portal.
#
Request Body
{
"projectSlug": "string",
"queryString": "string"
}
Where:
- projectSlug: The unique identifier of the project. It can be found in the project settings in the Project Designer.
- queryString: The query string that you would like to encode into the invite link.
#
Response
The response body is:
{
"inviteLink": "string",
"errorMessage": "string"
}
Where:
- inviteLink: The Verify Service link contains the encrypted parameters.
- errorMessage: The error message in case of an error.
#
Parameter Precedence
Precedence Order
There is a precedence order for project setting evaluation. Project settings is the base configuration for the invite link.
There are some project settings that can be overridden by query string parameters. The order of precedence is the following:
encrypted invite link queryString parameters >> non-encrypted query string parameters placed at the end of the invite link (exposed to the respondent)
The following project settings can be overridden / set with queryString parameters:
- targetUrl (if different URL per session is set in the project settings)
- returnUrl (if different URL per session is set in the project settings)
- userId
- panelProvider
- age
- gender
Encrypted query string parameters are part of the invite link so they are not exposed to the respondent, while non-encrypted query string parameters are visible parameters (exposed to the respondent) at the end of the invite link.
Besides the above mentioned project settings parameters, you can also set any custom parameters what you would like to hide from the respondent.
#
Usage Notes
Multiple Uses
An invite link can be used multiple times, each time a new verification session is created.
#
Example
import requests
import json
url = "https://verify-api-eu.realeyesit.com/api/v1/redirect/generate-invite-link"
api_key = "YOUR API KEY"
headers = {
"X-Api-Key": api_key,
"Content-Type": "application/json",
}
request = {
"projectSlug": "my-project-slug",
"queryString": "?userId=user123&targetUrl=https://example.com/survey&age=25&gender=male",
}
response = requests.post(url, headers=headers, data=json.dumps(request))
if response.status_code == 200:
invite_link = response.json()["inviteLink"]
print(f"Encrypted invite link: {invite_link}")
else:
print(response.status_code, response.text)