Prezio API uses token-based authentication for all requests. We support both standard API tokens and JSON Web Tokens (JWT). This guide explains how to obtain and use API tokens effectively.

Authentication Flow

1

Obtain an API token

Get your unique API token through the Prezio customer dashboard or by contacting support.

2

Include the token in requests

Add your token to the Authorization header with prefix Token for all API requests.

3

Access API resources

Make authenticated requests to any Prezio API endpoint you have permission to access.

Obtaining API Tokens

Customer Dashboard [coming soon]

  1. Log in to the Prezio Customer Dashboard
  2. Navigate to the API section
  3. Create a new API token with appropriate permissions
  4. Save the token securely - it won’t be displayed again

Contact Support

For enterprise access or if you don’t have dashboard access, contact:

support@prezio.eu

Include your account details and required access level.

Upon initial registration, users receive a sandbox token valid for 30 days. Our team will contact you near the end of this period to discuss extending access based on your needs.

Using API Tokens

Include your token in the HTTP Authorization header with the prefix Token:

Authorization: Token YOUR_API_TOKEN

Example Requests

curl -X GET "https://api.prezio.eu/api/live/?country=DK&tariff_id=tar_123" \
  -H "Authorization: Token YOUR_API_TOKEN"

Security Best Practices

Handling Authentication Errors

401 Unauthorized

{
  "detail": "Invalid token."
}

The token is invalid, expired, or missing. Verify you’re using the correct token with the “Token” prefix.

403 Forbidden

{
  "detail": "You do not have permission to perform this action."
}

Your token lacks permission for the requested resource. Contact support to adjust permissions.

Authentication failures count toward your rate limits. Implement proper error handling to avoid excessive authentication attempts.

Environment-Specific Authentication

Remember to use the appropriate token for each environment:

# Sandbox environment
Authorization: Token YOUR_SANDBOX_TOKEN

# Production environment
Authorization: Token YOUR_PRODUCTION_TOKEN

For questions regarding authentication or token management, contact our support team at support@prezio.eu.