Getting Started
Core Features
How-To Guides
Configuration
Troubleshooting
Integrations
When using Comp AI, you might occasionally encounter issues related to accessing the platform or its API. These issues are typically related to authentication (verifying who you are) or authorization (determining what you're allowed to do). This guide explains common access problems and how to resolve them, ensuring you can securely and effectively use Comp AI.
Before diving into specific issues, understanding a few key terms will be helpful:
Here are some common issues you might encounter and steps to resolve them.
This issue occurs when you are trying to access the Comp AI API using an API Key, but the key is either not provided, incorrectly formatted, or no longer valid.
API Keys are typically used for programmatic access to Comp AI, such as integrating with other systems or running automated tasks.
Symptoms: You might receive error messages like:
X-API-Key header is requiredInvalid API key formatInvalid or expired API keyEnsure that your request includes the X-API-Key header with your valid API Key. For example, in an API request, it should look like:
X-API-Key: your_api_key_here
Make sure the API Key is correctly copied and pasted without any extra spaces or characters.
API Keys can expire or be revoked. If you suspect your key is no longer valid, you may need to generate a new one within your Comp AI account settings or contact your organization's administrator.
This issue typically affects users interacting with the Comp AI web application or client applications that rely on your logged-in session. Your session token (JWT) might have expired or become invalid.
Symptoms: You might be redirected to the login page, or receive error messages such as:
Authentication token is invalid. Please log out and log back in to refresh your session.Invalid or expired JWT tokenThe most common solution for an expired or invalid session is to simply log out of Comp AI and then log back in. This will generate a new, valid session token.
When you are logged into Comp AI (using a JWT), many actions require you to specify which organization you are working within. If this context is missing, your request will be denied.
Symptoms: You might receive an error message like:
Organization context required: X-Organization-Id header is mandatory for JWT authenticationEnsure that your request includes the X-Organization-Id header with the unique identifier of the organization you wish to access. This is crucial for all authenticated actions when using a JWT.
X-Organization-Id: your_organization_id_here
Even if you are logged in and provide an X-Organization-Id, you must be a member of that specific organization to access its resources.
Symptoms: You might receive an error message like:
User does not have access to organization: your_organization_id_hereIf you believe you should have access to a particular organization, reach out to an administrator within that organization. They can add you as a member or adjust your roles and permissions.
CORS errors typically occur in web browsers when a web page tries to make requests to a server (like Comp AI's API) that is on a different domain than the web page itself. This is a security measure.
Comp AI is configured to allow access from its official web application domains and common local development environments (e.g., localhost). If you are developing a custom application, ensure your development server's origin is correctly configured.
Symptoms: You might see error messages in your browser's developer console related to CORS, such as:
Access to XMLHttpRequest at '...' from origin '...' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.If you are developing a custom application, ensure that the domain where your application is hosted is among the allowed origins for Comp AI. For local development, http://localhost:3000, http://localhost:3001, and http://127.0.0.1:3000 are typically allowed.
If you encounter CORS errors from an officially supported Comp AI application or a correctly configured custom application, please contact support.
Very rarely, you might encounter an error message indicating a problem with Comp AI's internal configuration or services. These are not typically user-facing issues but indicate a system-level problem.
Symptoms: You might receive error messages like:
Cannot connect to authentication service. Please check BETTER_AUTH_URL configuration.Internal access is not configured (in specific scenarios)Invalid internal token (in specific scenarios)These errors indicate a problem with the Comp AI service itself. Please report the issue to Comp AI support, providing any error messages and details about what you were doing when the error occurred.
X-API-Key, Authorization, X-Organization-Id). Double-check their presence and values.X-Organization-Id when interacting with organization-specific resources.