Skip to main content

Authentication

The Cover Whale API uses token-based authentication. Submit your credentials to get an access token, then include that token in all subsequent API requests. Tokens expire after 1 hour and can be refreshed without re-entering credentials.

Getting an Access Token

Send a POST request with your credentials:

Successful Response

Error Response

Using the Access Token

Include the AccessToken header in every API request:
The header name is AccessToken (no space, no “Bearer” prefix). This differs from the standard Authorization: Bearer <token> pattern.

Refreshing Tokens

When your access token expires, use the refresh token to get a new one without re-authenticating:
This returns a new AccessToken and RefreshToken.

Password Reset

If you need to reset your password:

Step 1: Request a Reset Token

A reset token will be emailed to the address associated with your account.

Step 2: Set New Password

Best Practices

  • Store tokens securely — Never expose access tokens in client-side code or logs.
  • Handle expiration — Check for 401 responses and refresh the token automatically.
  • Rotate credentials — Change your API password periodically.
  • One token at a time — Each authentication call invalidates previous tokens.

API Reference