Introduction
Contents
- Overview
- Base URL
- Authentication
- Error Handling
- Contact and Support
Overview
The Liveforce API allows you to integrate with Liveforce's services and access various functionalities to enhance your application. This documentation provides information on how to interact with the API, including details about endpoints, request/response formats, and error handling.
Base URL
All API requests should be made to the following base URL:
https://theliveforce.app/api/v1
Authentication
The Liveforce API uses Basic Authentication to authenticate requests. To authenticate, you must include an Authorization header with each API request. The header should contain the word Basic followed by a space and a base64-encoded string client_id:access_token.
Obtaining Client ID and Access Token
To access your client ID and access token, follow these steps:
Log in to your Liveforce AI client panel.
Navigate to the "Apps" module.
Request access to the REST API.
Your client ID and access token will be provided upon approval.
Example of Authentication Header
Authorization: Basic base64_encode(client_id:access_token)
Error Handling
Liveforce follows standard HTTP response codes to convey the results of API requests. Here's how they break down:
2xx Success: These codes confirm that your request was processed successfully.
4xx Client-Side Errors: These codes indicate that the request was not processed due to an issue on the client's side, such as missing information or invalid data. It's important to review and fix these errors in your request.
HTTP Status Code Summary
STATUS CODE | STATUS | SUMMARY |
---|---|---|
200 | OK | Everything worked as expected |
400 | Bad Request | Bad Request |
401 | Unauthorized | No valid API key provided. |
402 | Request Failed | The parameters were valid but the request failed. |
403 | Forbidden | The API key doesn’t have permissions to perform the request. |
404 | Not Found | The requested resource doesn’t exist. |
429 | Too Many Requests | Too many requests hit the API too quickly. We recommend an exponential backoff of your requests |
412 | Precondition Failed | Required data is not configured or not found |
500, 502, 503, 504 | Server Errors | Something went wrong on Liveforce’s end. (These are rare.) |
Some 4xx errors also provide a specific error code that gives additional insight into what went wrong—like a declined transaction or an invalid request. This allows for more precise error handling in your application.
Error Code Summary and Handling
ERROR CODE | ERROR TYPE | SUMMARY | HANDLING ADVICE |
---|---|---|---|
4001 | INVALID_PARAMETER | A required parameter is missing or invalid | Check and correct the request parameters. |
4002 | UNPROCESSABLE_ENTITY | The request is well-formed, but there is a validation error. | Correct the data according to the error message. |
4003 | RESOURCE_NOT_FOUND | The requested resource could not be found. | Verify the resource ID in the request. |
4004 | UNAUTHORIZED_ACCESS | Authentication credentials are missing or invalid. | Ensure the correct credential is used. |
4005 | ACCESS_DENIED | The client does not have permission to access this resource. | Verify user permissions. |
4006 | DUPLICATE_DATA | The request is attempting to create data that already exists. | Verify that the data being submitted is unique. |
4007 | NOT_CONFIGURED | The required data for the request is not configured | Ensure the required data is correctly configured in the previous step before proceeding |
Contact and Support
If you have any questions or need further assistance, please contact our support team at support@liveforce.ai.