API Connection & SSO
Understand the process of creating exhibitor users in the FFAIR portal using the FFAIR API, and setting up SSO for the exhibitors.
1. Enabling API & SSO Integration
To get started with API and SSO, enable the integration in your FFAIR Organiser Portal:
- Log in to your FFAIR Organiser Portal.
- Select the required show from the "Shows" page.
- Navigate to "Show Settings" from the left-hand menu.
- Go to the "API & SSO" section on the settings page.
- Toggle the blue switch to enable the integration.
Once enabled, the API functionality can be used to create, update, and retrieve exhibitor data, while SSO ensures seamless login for exhibitors.
2. GET AUTH TOKEN (GET)
https://us-central1-ffair-live.cloudfunctions.net/endpointsSSO-getAuthToken

3. CREATE EXHIBITORS
Both update/create exhibitors use the same cloud function endpoint:
https://us-central1-ffair-live.cloudfunctions.net/endpointsSSO-createExhibitors

Create/Update Exhibitor request example:
Note: companyName, standName, contactEmail fields cannot be changed.
Note2: exhibitorId should be used when creating a new Exhibitor.
{
"data":{
"showId":"",
"exhibitors":[
{
// external exhibitor id
"exhibitorId":"12345", // string (required *, use this when creating a new Exhibitor)
"internalId":"12345", // string (required *, automatically generated, can be found in the resposnse body, when creting a new Exhibior, cannot be used when creating a new Exhibitor)
// * -- only 1 of 2 must be in (xor operation)
"companyName":"First Company", // string (required)
"contactName":"Mark Strong", // string (required)
"contactEmail":"mark.strong@mailinator.com", // string (required)
"buildType":"build 1", // string (required)
"standNumber":"G34", // string (required)
"contactNumber":"343-43-35", // string (optional)
"companyAddress":"London, UK", // string (optional)
"companyPostcode":"343 KO9", // string (optional)
"isPrimary":true, // string (optional)
"standWidth":10, // float number (optional)
"standLength":12, // float number (optional)
"irregularArea":100, // float number (optional)
"openSides":30, // number (optional)
"standWallLength":13, // number (optional)
"contractorCompanyName":"Event Tech", // string (optional)
// to load packages, it must exists on the show
// package name must be one of the show package names
"packages":[
{
"name":"Package 1", // string (required)
"quantity":3 // number (required)
},
{
"name":"Package 2",
"quantity":4 (number)
}
], // array (optional)
// to load custom fields, it must exists on the show
// custom field id you can find in exhibitors template (Show Exhibitors->Bulk Upload -> Downdload Template)
// custom field value for all types should be string;
// custom field file type value should be base64 file string;
// custom field file type supported extensions .doc,.docx,.pdf,.jpg,.jpeg,.png,.gif,.eps,.bmp,.xlsx;
// custom field file type maximum size is 5mb
"customFields":[
{
"id":"jqWDUfXDA85b1gD6VhhS", // string (required)
"value":"123" // string (required)
},
{
"id":"FuwG0wI5511K7dYxQE5o", // string (required)
"value":"some text" // string (required)
}
] // array (optional)
}
]
}
}
Note: Multiple files can be uploaded to the same File Upload custom field on a single Stand via the createExhibitors API.
To achieve this, multiple objects with the same custom field ID must be included in the customFields array, e.g.:
"customFields": [
{
"id": "customFieldId",
"value": "validFile1ConvertedToBase64String"
},
{
"id": "customFieldId",
"value": "validFile2ConvertedToBase64String"
},
{
"id": "customFieldId",
"value": "validFile3ConvertedToBase64String"
}
]
Note 2: If a file is uploaded to a File Upload custom field via the createExhibitors API and the custom field already contains previously added files, the new file should be appended to the field. Existing files must not be replaced; they should remain.
Response Example:
{
"return": {
"exhibitors": [
{
"email": "test_api@mail.com",
"id": "BGoziHInalNh4HW0qKoa55DWyGk2",
"externalExhibitorId": "F112asjhkas911311",
"inviteLink": "https://app.ffair.io/sign-up/exhibitor?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaG93SWQiOiJkaGJHcElicjU1NDhHZENpc0t3dCIsImV4aGliaXRvclBhaXJJZCI6ImJjMzk1Mjc5LTFlYTEtNDZiOC1iOWMzLTg5Y2U4NjM1NWMwMyIsImV4aGliaXRvclVzZXJDb25uZWN0aW9uSWQiOiI5M2M1YTEyNi00MjRmLTRlNDctYTc1OC03MjQ3NjNmMTI3YjgiLCJpYXQiOjE3Njg1Nzk4MjksImV4cCI6MTkyNjM2NzgyOX0.6MzWsFA0kbcUUTtD9J2sQUFJi_yerrppjK61zMm4xTk"
}
]
}
}
GET EXHIBITORS
https://us-central1-ffair-live.cloudfunctions.net/endpointsSSO-getExhibitors

Return Exhibitor Data Type:
type ExhibitorStatus = "notInvited"|"pending"|"active"|"archived"|"blocked;
export type GetPackageResponse = {
id: string;
name: string;
quantity: number;
};
export type GetCustomFieldResponse = {
id: string;
title: string;
type: "text" | "hyperlink" | "number" | "fileUpload" | "paragraph";
value: string[] | string | number | null;
name?: string | null; // only for "hyperlink" type
};
export type GetExhibitorResponse = {
id: string;
externalId: string | null;
lastName: string;
firstName: string;
email: string;
inviteLink: string;
contactNumber: string | null;
status: ExhibitorStatus;
company: {
id: string;
createdAt: string;
address: string | null;
name: string;
postcode: string | null;
webAddress: string | null;
keyContractor: string | null;
};
stand: {
id: string;
createdAt: string;
name: string;
openSides: number | null;
primaryId: string | null;
invitationDate: string | null;
size: { area: string; width: string; length: string } | null;
wallLength: number | null;
packages: GetPackageResponse[];
buildType: {
id: string;
name: string;
};
customFields: GetCustomFieldResponse[]
};
};



Exhibitor SSO login
This document describes how to login into the FFAIR Exhibitor portal from an external source. We follow the OAUTH 1.0. HMAC- SHA1 signature to generate and validate the URL
Assumptions:
- Exhibitor users are created in the FFAIR and external system
- Each exhibitor contact has the unique identifier that is the same in both systems
- The API connection in the organiser’s portal is enabled
Request method and URL
HTTP Method: GET
BaseURL: https://app.ffair.io/login/sso
Parameters
You now need to gather all the parameters used in the request and to generate the signature. Below are the list of parameters required.
|
Parameter Name |
Example Value |
Description |
|
clientReference |
0x1vttknep8VizGkTYhL |
This is a pre-shared value that is unique to each exhibitor and has to be uploaded to the both platforms |
|
timestamp |
1318634455 |
This is a UNIX timestamp. The link will expire 1 hour after this time. |
|
showId |
7t9hlzjU4Z7xd5Dq9OXd |
This is a pre-shared value that is unique to each show |
|
signature |
Yndh1rEqdxD%2bSnmF7jbxJ/zAGyo= |
This is a value that has to be generated by using instructions below. |
Parameters need to be encoded into a single string which will be used later. The process to build the string looks like this:
- Encode every key and value that will be signed.
- Sort the list of parameters alphabetically
- For each key/value pair:
- Append the encoded key to the output string.
- Append the ‘=’ character to the output string.
- Append the encoded value to the output string.
- If there are more key/value pairs remaining, append a ‘&’ character to the output string.
The following example string should be created:
|
clientReference=0x1vttknep8VizGkTYhL&signature=Yndh1rEqdxD%2bSnmF7jbxJ/zAGyo=&showId=7t9hlzjU4Z7xd5Dq9OXd×tamp=1318634455 |
Signature base string
The values collected so far need to be joined to make a single string from which we will generate the signature. This is called the signature base string.
To encode the HTTP method, base URL, and SSO parameters into a single string:
▪ Convert the HTTP Method to uppercase and set the output string equal to this value.
▪ Append the ‘&’ character to the output string.
▪ Encode the base URL and append it to the output string.
▪ Append the ‘&’ character to the output string.
▪ Encode the parameter string and append it to the output string.
These steps are made according to the documentation.
Signature base string looks like this:
|
GET&https%3A%2F%2Fapp.ffair.io%2Flogin%2Fsso&clientreference%3D1 0x1vttknep8VizGkTYhL%26showId%3D17t9hlzjU4Z7xd5Dq9OXd%26timestamp%3D1318634455 |
Make sure to percent encode the parameter string! The signature base string should contain exactly 2 ampersand ‘&’ characters. Any percent ‘%’ characters in the parameter string should be encoded as %25 in the signature base string.
Calculating the signature
Finally, the signature is calculated by passing the signature base string and signing key to the HMAC- SHA1 hashing algorithm. The output of the HMAC signing function is a binary string. This needs to be base64 encoded to produce the signature string.
After calculating the signature should looks like this:
Yndh1rEqdxD%2bSnmF7jbxJ/zAGyo=
Putting parameter and signature all together creates a final SSO link:
|
https://app.ffair.io/login/sso?clientreference=0x1vttknep8VizGkTYhL&showId=7t9hlzjU4Z7xd5Dq9OXd×tamp=1318634455&signature=Yndh1rEqdxD%2bSnmF7jbxJ/zAGyo= |
See our documentation here: Public API * SSO