This article explains the difference between API v1 and API v3 authentication in LiveAgent, how to obtain and use the correct API key for each version, and how to resolve the ApiKey not found (403) error when calling API endpoints.
Understanding API v1 and API v3 Keys
LiveAgent supports two API versions — API v1 (deprecated, but still functional) and API v3 (current, actively developed). These two versions use separate API keys and are managed in different places. Using an API v3 key against an API v1 endpoint (or vice versa) will result in authentication errors such as 403 ApiKey not found.
How to Obtain Your API Key
API v3 Key
- Log in to your LiveAgent account.
- Navigate to Configuration > System > API.
- Generate a new API key or copy an existing one.
- Make sure the key has the appropriate permissions assigned for the endpoints you intend to use (e.g., read/write access to conversations or tickets).
API v1 Key
- Go to the Configuration > System > API page.
- In the upper right corner of the API settings page, switch to the "Settings for API v1" section.
- Obtain your API v1 key from that section.
Common Error: 403 ApiKey not found
This error typically occurs when:
- You are using an API v3 key to authenticate against an API v1 endpoint (or vice versa).
- The API key has insufficient permissions for the requested operation.
- The API key is invalid or has been revoked.
Solution: Ensure you are using the correct key for the API version you are targeting. If you are calling API v3 endpoints (e.g., POST /api/conversations/{conversationId}/messages), use your API v3 key with the required permissions configured. If you are calling API v1 endpoints, use your API v1 key obtained from the "Settings for API v1" section.
Posting Messages via API v3: Ticket ID vs. Conversation ID
API v3 uses a conversation ID (not a ticket ID) to identify conversations when posting messages. If you are working with ticket IDs from the LiveAgent interface or API v1, you will need to retrieve the corresponding conversation ID first before calling endpoints such as:
POST /api/conversations/{conversationId}/messages
To find the conversation ID for a given ticket, use the API v3 tickets or conversations endpoint to look up the record and retrieve its conversationId field.
Key Points to Remember
- API v1 and API v3 require separate, distinct API keys.
- API v3 keys are managed under Configuration > System > API.
- API v1 keys are found in the "Settings for API v1" section (upper right corner of the API settings page).
- Always verify that your API key has the correct permissions for the operations you want to perform.
- API v3 endpoints use conversation IDs, which may differ from ticket IDs used in API v1 or the LiveAgent UI.
- Both API versions can be used simultaneously if needed.