Skip to main content
View as Markdown

Authentication

Create an API key in the Exhibitor Center, then send it with every request to the Leads API.

When to use an exhibitor API key​

Use an exhibitor API key when you want to:

  • Interact with your exhibition booth through the API.
  • Run a script that exports data from your exhibition booth on Swapcard.
  • Automate actions in your own CRM, such as importing the leads your team collected.

Organizing the event rather than exhibiting at it? Use an organizer API key instead.

Create an API key​

  1. Open the Exhibitor Center and select your exhibition booth.
  2. Go to Leads > API keys.
  3. Select Create key.
  4. Copy the key and store it somewhere safe, such as a secrets manager or an environment variable.

The API keys page in the Exhibitor Center, with Leads > API keys selected in the sidebar and the "Create key" button highlighted

Some pages and tools call the API key an access token. Both names refer to the same thing.

Send the API key with your requests​

Every request needs a valid API key. Send the key as-is in the Authorization header, with no Bearer prefix.

The examples below send a minimal query to the Leads API endpoint, https://developer.swapcard.com/exhibitor/graphql. If the key is valid, the response contains a data object.

curl https://developer.swapcard.com/exhibitor/graphql \
-H 'Authorization: <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{"query":"{ __typename }"}'

Next, see the Leads API integration examples.

Keep your API key secure​

Your API key gives access to your private Swapcard data. Treat it like a password.

warning
  • Keep the key on your server. Never embed it in a web page, a mobile app or any other client-side code.
  • Only request the data your integration needs.