Before creating a lead you must first get the unique identifier of a guest (UID). This UID is available in a guest's QR-Code. Eventmaker QR-Codes contains MeCard that embeds data on the guest such as:
the name (N)
the email (EMAIL)
the company name (ORG)
the position (TITLE)
the phone number (TEL)
the guest unique identifier (UID)
⚠️Note that only the UID is mandatory in the MeCard. It's up to the event organizer for the other fields.
Create one or more leads
With the UID you can then create the lead on the Eventmaker platform. This is done with the batch_create API that allows you to create one or more leads for an exhibitor. Remember that the exhibitor is authenticated by its access_token :
Example
curl -X POST -H 'Content-Type: application/json' https://app.eventmaker.io/api/v1/devices/<access_token>/connections/batch_create.json -d @payload.json
💡replace <access_token> with the exhibitor access token
With payload.json :
You can ignore the comments and exhibitor_products fields.
Get leads details
Creating a lead doesn't give you much information. You can get more data by requesting the lead_guests API which returns a list of fields. These fields are related to the event and are whitelisted by the event organizer, meaning that they decide which fields get returned by this API.
Example
curl -X GET -H 'Content-Type: application/json' "https://app.eventmaker.io/api/v1/lead_guests/<guest_uid>.json?access_token=<access_token>"
💡replace <access_token> with the exhibitor access token
💡replace <guest_uid> with the UID extracted in the MeCard
Sample response
Some events require ciphered QR-Codes. For these events, your app will need to get back a ciphering key and IV to decipher QR-Code before following the flow described previously.
When QR-Code ciphering is enabled on an event you need to get back the ciphering key and IV using this API :
💡replace <signature> with the signature (see below how to generate the signature)
💡replace <event_id> with the event_id
💡replace <access_token> with the exhibitor access_token
Sample response (when QR-Code ciphering is not enabled) :
If signature is incorrect you will get a 401 status code, 200 otherwise.
Computing the signature 🔏
First your app need to be registered into Eventmaker (contact us) and we will deliver you a secret.
Then the signing_key must be the concatenation of the secret and the event_id :
<secret><event_id>
Finally you need to sign the exhibitor access token with the signing key using hmac-sha256 :
Deciphering QR-Code
When Eventmaker QR-Code are ciphered, their content will look like something:
E:somecipheredunreadablestuff
When you scan a QR-Code you should always look for the prefix E: and if found, you will need to decipher the content. The content is ciphered with AES 256 using the block cipher mode CBC. Keys, IV and real mecard content (everything after E:) is base 64 encoded and will need to be decoded first (before deciphering process).
⚠️ensure your app works with both ciphered and not ciphered QR-CodeSample code iOS (objective-c) :