Authentication
Every versioned API request needs an API key. Add it to the x-api-key request header. Keys start with slapi_.
Get your API key
- Create an account.
- Activate your account from the email we send you.
- Copy the key from your dashboard or Settings > API key.
Send the key with cURL
curl --get 'https://api.sociallisteningapi.com/api/v1/linkedin/search' \
--data-urlencode 'query=social listening' \
--data-urlencode 'raw=true' \
--header 'x-api-key: YOUR_API_KEY'
Send the key with JavaScript
const response = await fetch(
"https://api.sociallisteningapi.com/api/v1/linkedin/search?query=social%20listening",
{
headers: {
"x-api-key": process.env.SOCIALLISTENING_API_KEY,
},
},
);
const result = await response.json();
Keep your key safe
- Store it in an environment variable or secret manager.
- Send it in the
x-api-keyheader. Do not put it in the URL. - Keep it out of browser code, mobile apps, public repositories, screenshots, and logs.
- Call SocialListeningAPI from your server so the key stays private.
Authentication errors
A missing or invalid key returns 401. An account that has not been activated returns 403. If the workspace has no credits left, the API returns 402. These responses do not use credits.