Authentication

Set up the authentication for your API to help users manage their credentials.

Authenticate API requests using Bearer tokens in the Authorization header. Each token is unique to your user account and provides access to your company's data.

Generate an API Token

Create your API token (integration key) to start making authenticated requests:

  1. Log in to your Trustmarkt account at https://www.trustmarkt.de
  2. Navigate to your profile by clicking on your avatar in the top right
  3. Select Einstellungen (Settings)
  4. Scroll to the bottom of the page
  5. Find the section Integrationsschlüssel (Integration Keys)
  6. Click to create a new integration key
❗️

If you can't find the section "Integrationsschlüssel", your account does not have access to the Trustmarkt API. Check if your company's plan has access to the feature "API-Zugang".

❗️

Store Your Token Securely
Your API token is displayed only once immediately after creation. Copy it and store it in a secure location (like a password manager or environment variable). You cannot retrieve it again later. If you lose it, you'll need to generate a new token.

You can create up to 5 active tokens per account. This allows you to use separate tokens for different integrations or environments (development, staging, production).

Making Authenticated Requests

Include your API token in the Authorization header using the Bearer authentication scheme:

Authorization: Bearer YOUR_API_TOKEN
curl https://api.trustmarkt.de/v1/reviews \
  -H "Authorization: Bearer tm_1234567890abcdef"

Premium Access Required

crown

Premium Subscription Required
API access is exclusive to Premium customers. Without an active Premium plan, all API requests will fail with a 403 Forbidden error, even with a valid token.

Upgrade your account to Premium at https://www.trustmarkt.de/preisgestaltung to enable API access.

Response when Premium is not active:

{
  "message": "This action is unauthorized."
}

HTTP Status: 403 Forbidden

Authentication Errors

Handle these authentication-related errors in your integration:

401 Unauthenticated

The Authorization header is missing, malformed, or contains an invalid token.

{
  "message": "Unauthenticated."
}

Common causes:

  • Missing Authorization header
  • Token format is incorrect (must be Bearer YOUR_TOKEN)
  • Token has been deleted or revoked
  • Token belongs to a different account

403 Authorization Error

You don't have permission to access the requested resource.

{
  "message": "This action is unauthorized."
}

Common causes:

  • No active Premium subscription
  • Attempting to access data from another company
  • Insufficient permissions for the requested action

Security Best Practices

Follow these guidelines to keep your API tokens secure:

Store tokens as environment variables
Never hardcode tokens in your source code. Use environment variables or secure secret management systems.

# .env file (never commit this to version control)
TRUSTMARKT_API_TOKEN=1000|1234567890abcdef

Use different tokens for different environments
Create separate tokens for development, staging, and production. If one is compromised, you can revoke it without affecting other environments.

Rotate tokens periodically
Regenerate tokens every few months as a security precaution. Delete old tokens after rotation.

Never share tokens
Each developer or system should use its own token. This makes it easier to track usage and revoke access when needed.

Delete unused tokens
Remove tokens you're no longer using to minimize security risks. You can view and delete tokens in your profile settings.

Token Management

Viewing Active Tokens

See all your active integration keys in your profile settings under Integrationsschlüssel. The list shows:

  • Token name (if provided during creation)
  • Creation date
  • Last used date

Revoking a Token

To revoke a token:

  1. Go to your profile settings
  2. Navigate to Integrationsschlüssel
  3. Click the delete button next to the token you want to revoke
  4. Confirm the deletion

Revoked tokens stop working immediately. Any requests using the revoked token will receive a 401 error.

Token Limits

  • Maximum tokens per account: 5
  • Token expiration: Tokens don't expire automatically, but should be rotated periodically for security

Testing Your Authentication

Use the /me endpoint to verify your authentication is working correctly:

curl https://api.trustmarkt.de/v1/me \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Successful response:

{
  "id": "5GdkVeN8ZLaw29zBDXyb",
  "company_id": "XZzyJn9jEB1lWdvVRx6w",
  "name": "John Doe",
  "email": "[email protected]",
  "total_reviews": 42,
  "average_rating": 4.25,
  "trustability": {
    "social": true,
    "email": true,
    "phone": false
  },
  "url": "https://www.trustmarkt.de/nutzer/john-doe",
  "created_at": "2026-02-28T16:12:10+01:00"
}

If you receive this response, your authentication is configured correctly.

Need Help?

Having trouble with authentication? Contact our support team via the live chat on https://www.trustmarkt.de.