Steps for Basic Authentication

1

Convert the API Key into a Base64 Encoded String

To authenticate using Basic Auth, you need to convert your API key into a Base64 encoded string.

Here’s how you can do it:

  • Take your API key (e.g., stackone-ats-key).
  • Convert the API key into a Base64 string.

Example in Python:

import base64

api_key = 'your_api_key_here'
base64_api_key = base64.b64encode(api_key.encode()).decode()
print(base64_api_key)
2

Using the Base64 Encoded API Key for API Requests

Now, you can use the Base64 encoded API key to authenticate API requests.

For example, to call the GET /accounts endpoint:

Header:

--header 'authorization: Basic <BASE64_API_KEY>'

This way, you can use API keys for basic authentication requests, ensuring secure and authenticated access to StackOne API endpoints.