Authentication

You'll need to authenticate your requests to access any of the endpoints in the Selectify API. In this guide, we'll look at how authentication works.

Using an SDK

If you're using one of our SDKs, we recommend managing your credentials as environment variables. Fetch your access token from the Selectify dashboard under API settings and load it into your environment under the SELECTIFY_API_KEY key. You'll likely do this with a package like dotenv but you might also manually edit it to your CI environment secrets. All the client libraries use bearer auth behind the scenes.

Bearer token

If you're issuing raw requests to the Selectify API, you'll have to manually provide your token in the request header. You can find and generate tokens in the Selectify dashboard under API settings. Here's how to add the token to the request header using cURL:

Example request with bearer token

curl https://api.selectify.ai/v1/page_state \
  -H "Authorization: Bearer {token}"

Always keep your token safe and reset it if you suspect it has been compromised.