Securing API Tokens
Best practice for keeping your API tokens confidential and secure.
API tokens give you "access all areas" privileges to your Claimable account. This is useful and powerful for building robust and innovative integrations, but also can pose a security risk if your tokens are not properly secured.
π API Token Security Guidelines
Every integration project and development team is different, and you should follow the rules set out by your corporate IT policies, but the following general guidelines will help you adopt widely-accepted best practice when it comes to securing your API tokens.
β Don't:
- Never share your API token with anyone outside your team or organisation.
- Never send your API token over email or any unsecured channel.
- Never write your API token down or store it an unencrypted location.
- Never "hardcode" your API token or commit it to source control.
- Never store your API token in client-side code (e.g. JS, HTML) or in browser cookies or local storage.
β
Do:
- Immediately revoke an API token if you suspect it is compromised.
- Rotate API tokens regularly. At least once-per-year is ideal.
- Always use HTTPS (secure HTTP) when transporting your API token.
- Use different API tokens for staging, test and production environments.
- User server-side environment variables to avoid committing API tokens to source code and limit their exposure beyond your secure deployed environments.
Protect API Tokens
Treat your API tokens like top-secret passwords and avoid writing them down or sharing them.
π API Token Rotation
To further boost security, it's a good idea to "rotate" your API tokens on a regular basis, such as annually.
This is a simple process that typically involves generating new API Tokens, updating them in your projects, then revoking the old token once you've confirmed the new token works.
We recommend you rotate your Claimable API token on a regular basis.
Updated almost 4 years ago