latestOpenAPI 3.0.32026-08-109359194.9 KB
112399a67ebb
Authentication
Generates an encrypted referstring for authentication
This endpoint will generate encrypted refer strings that can be used to authenticate users into an Unqork environment
Environment Variables - The following Environment Variables are required
- key : key for encryption
- cipher : method of encryption. The default and recommended cipher is aes-256-gcm.
Include this refer string in the link to an Unqork resource as follows
<hostname>?refer=<referString>/#/display/<resource_id>
- hostname - host name of Unqork server
- referString - referString returned from API
- resource_id - Id of the Unqork resource to viewFor example, https://client.unqork.io?refer=<referString>/#/display/abcd123
Examples
Example 1: Generate Refer String for 1 day (default role)
Request
{
"userId": "user123",
"expireOffset": 1,
"expireMeasure": "days"
}
Response
{
"referString": "<encrypted refer string>"
}
Example 2: Generate Refer String for single use (recommended)
Request
{
"userId": "user123",
"expireOffset": 1,
"expireMeasure": "days",
"oneTimeUse": true
}
Response
{
"referString": "<encrypted refer string>"
}
Example 3: Generate Refer String for custom role
Request
{
"userId": "user123",
"expireOffset": 1,
"expireMeasure": "days",
"additionalParams": {
"role": "customRole"
}
}
Response
{
"referString": "<encrypted refer string>"
}
Example 4: Generate Refer String with custom user parameters
Request
{
"userId": "user123",
"expireOffset": 1,
"expireMeasure": "days",
"additionalParams": {
"custom1": "custom value 1",
"custom1": "custom value 2",
"custom1": "custom value 3"
}
}
Response
{
"referString": "<encrypted refer string>"
}
Authorization Required:
- Designer Administrator
post/referstring
Request body
Response
Successful Generation