Authentication

The API supports Basic HTTP Authentication using your account email and password, or alternatively, an API key or API token.

Basic Auth

API Keys

API Token


Basic Authentication

To authenticate using Basic Auth:

  1. Format your credentials as email:password.
  2. Encode the string using Base64 and prepend the encoded string with Basic and include it in the Authorization header.

Example Header:

Authorization: Basic ZW1haWw6cGFzc3dvcmRPckFwaUtleQ==

When using curl, the -u option automatically handles encoding:

curl -X GET -u 'email:password' https://www.keycafe.com/v0/key
📘

⚠️ Note: If two-factor authentication (2FA) is enabled on your account, password-based authentication will not work. In this case, use an API key or token generated with 2FA enabled (see the Authorization section for details).


API Keys

API keys can be used as a substitute for passwords, but require appending /key to the username. When using a keys, append /key at the end of your email address in the username field (example: user@mail/key) where the email address is variable.

  • Username: {email}/key
  • Password: key
curl -X GET -u '{email}/key:{key}' https://www.keycafe.com/v0/key

Keys can be generated in your account settings.

📘

🚧 Deprecation Notice:
API keys are now deprecated. To enhance security and streamline access management, we strongly recommend migrating to API tokens for all authentication purposes.

API Token

For accounts with two-factor authentication enabled or client implementations desiring additional security, authorization tokens can be used in place of passwords and API keys. When using a token, append /token to your email in the username field (example: user@mail/token) where the email address is variable.

  • Username: {email}/token
  • Password: token
curl -X GET -u '{email}/token:{token}' https://www.keycafe.com/v0/key

To manage authorization tokens via the RESTful endpoint, refer to Authorization