Skip to main content
This guide covers the HMAC signature authentication pattern used to secure requests to the Papermap Dashboard API.

How HMAC Authentication Works

The core security pattern uses HMAC-SHA256 to sign requests to the Papermap API:
  1. Concatenate workspace_id + valid_until timestamp
  2. Create HMAC-SHA256 hash using your secret key
  3. Send signature + timestamp in headers
  4. Papermap API verifies signature with the same secret

Authentication Flow

If the signature doesn’t match or the timestamp has expired, the request is rejected with a 401 Unauthorized error.

Implementation by Language

Token Expiration

  • API requests: 5 minutes validity(advisable) based on the example above (valid_until = now + 300)
  • Expired tokens are automatically rejected

Security Best Practices

Never hardcode API credentials: - Always use environment variables or a secrets management system - The API endpoint URL should be treated as sensitive configuration - Store credentials securely and rotate them regularly

Environment Configuration

Store your credentials securely:
.env
Obtaining Your Configuration: - API Credentials: Available in your Papermap dashboard under Settings → API Keys - API Endpoint: Available in Settings → API Configuration - Always use the values provided in your dashboard for your specific workspace

Next Steps

Creating Dashboards

Learn how to create and manage dashboards for your tenants

Iframe Tokens

Generate secure tokens for embedding dashboards