### cURL Request Example Source: https://lolzteam.readme.io/reference/usersget Example of how to make a GET request to the Get User endpoint using cURL. Includes the base URL and necessary headers. ```shell curl --request GET \ --url https://prod-api.lolz.live/users/ \ --header 'accept: application/json' ``` -------------------------------- ### API Paths Example Source: https://lolzteam.readme.io/reference/conversationsread Defines the available API endpoints. Each path object contains HTTP methods (like GET, POST) and their corresponding operations. ```json "paths": { "/conversations": { "get": { "summary": "List conversations", "operationId": "getConversations", "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 10 } }, { "name": "offset", "in": "query", "schema": { "type": "integer", "default": 0 } } ], "responses": { "200": { "description": "A list of conversations.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Resp_Conversations" } } } } } } } } ``` -------------------------------- ### NotFound Schema Example Source: https://lolzteam.readme.io/reference/threadspollvote This example demonstrates the structure of a 'NotFound' response, including error messages and system information. ```json { "schema": { "title": "NotFound", "type": "object", "required": [ "errors", "system_info" ], "properties": { "errors": { "title": "Errors", "type": "array", "items": { "type": "string" } }, "system_info": { "$ref": "#/components/schemas/Resp_SystemInfo" } } }, "examples": { "ContentNotFound": { "summary": "Content Not Found", "value": { "errors": [ "The requested ... could not be found." ], "system_info": { "visitor_id": 0, "time": 0 } } } } } ``` -------------------------------- ### Discoverability Source: https://lolzteam.readme.io/reference/assetscss System information and availability can be determined by sending a GET request to the index route (/). A list of resources will be returned. If the request is authenticated, the revisions of API system and installed modules will also be made available for further inspection. ```APIDOC ## GET / ### Description Retrieves system information, availability, and resource lists. If authenticated, also returns API system and installed module revisions. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **oauth_token** (string) - Optional - Used for authentication. #### Headers - **Authorization**: "**Bearer _token_**" - Optional - Used for authentication. ``` -------------------------------- ### Lolzteam Public API - Discoverability Source: https://lolzteam.readme.io/reference/oauthtoken System information and availability can be determined by sending a GET request to the index route (/). A list of resources will be returned. If the request is authenticated, the revisions of API system and installed modules will also be made available for further inspection. ```APIDOC ## GET / ### Description Retrieves system information and availability. If authenticated, also returns API system and installed module revisions. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **oauth_token** (string) - Optional - Used for authentication. #### Headers - **Authorization**: "**Bearer _token_**" - Optional - Used for authentication. - **Api-Bb-Code-Chr**: !youtube - Optional - Replace multimedia tags (except youtube) in bbcode html with **tools/chr** link. - **Api-Username-Inline-Style**: Optional - Return rich username for **username** fields. ``` -------------------------------- ### Discoverability Source: https://lolzteam.readme.io/reference/conversationsmessagesunstick System information and availability can be determined by sending a GET request to the index route ('/'). If the request is authenticated, revisions of the API system and installed modules will also be made available. ```APIDOC ## GET / ### Description Retrieves system information and availability. If authenticated, also returns API system and installed module revisions. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **oauth_token** (string) - Optional - Your API token. ### Headers - **Authorization**: "**Bearer _token_**" - Optional - Your API token. ``` -------------------------------- ### Content Not Found Example Source: https://lolzteam.readme.io/reference/chatboxreport This example demonstrates the structure of an error response when content is not found. It includes a list of errors and system information. ```json { "errors": [ "The requested ... could not be found." ], "system_info": { "visitor_id": 0, "time": 0 } } ``` -------------------------------- ### Discoverability Source: https://lolzteam.readme.io/reference/categoriesget System information and availability can be determined by sending a GET request to the index route ('/'). This endpoint returns a list of available resources. If the request is authenticated, it also provides revisions of the API system and installed modules. ```APIDOC ## GET / ### Description Retrieves system information, availability, and a list of resources. If authenticated, also returns API system and module revisions. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **oauth_token** (string) - Optional - Used for authentication. #### Headers - **Authorization**: "**Bearer _token_**" - Optional - Used for authentication. ### Response #### Success Response (200) - **resources** (array) - A list of available API resources. - **api_revision** (string) - The revision of the API system (if authenticated). - **modules** (object) - Revisions of installed modules (if authenticated). #### Response Example { "resources": [ "users", "categories", "threads" ], "api_revision": "1.1.41", "modules": { "forum": "2018100301" } } ``` -------------------------------- ### Discoverability Source: https://lolzteam.readme.io/reference/chatboxgetmessages System information and availability can be determined by sending a GET request to the index route (/). If the request is authenticated, the revisions of API system and installed modules will also be made available for further inspection. ```APIDOC ## GET / ### Description Retrieves system information and API availability. If authenticated, also returns API system and module revisions. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **oauth_token** (string) - Optional - Used for authentication. ### Headers - **Authorization**: "**Bearer _token_**" - Used for authentication. ``` -------------------------------- ### Lolzteam Public API Information Source: https://lolzteam.readme.io/reference/profilepostsedit System information and availability can be determined by sending a GET request to the index route (/). If the request is authenticated, revisions of the API system and installed modules will also be made available. ```APIDOC ## GET / ### Description Retrieves system information and availability. If authenticated, also returns API system and installed module revisions. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **oauth_token** (string) - Optional - Used for authentication. ### Headers - **Authorization**: "**Bearer _token_**" - Used for authentication. - **Api-Bb-Code-Chr**: !youtube - Optional - Replace multimedia tags (except youtube) in bbcode html with **tools/chr** link. - **Api-Username-Inline-Style**: Optional - Return rich username for **username** fields. ``` -------------------------------- ### System Information and Availability Source: https://lolzteam.readme.io/reference Determine system information and availability by sending a GET request to the index route ('/'). This endpoint returns a list of resources. If authenticated, it also provides revisions of the API system and installed modules. ```APIDOC ## GET / ### Description Retrieves system information, availability, and resource list. If authenticated, includes API system and module revisions. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **locale** (string) - Optional - Specifies the user-facing language for messages. Uses ISO 639-1 codes, optionally with ISO 3166-1 alpha 2 country codes separated by a hyphen. - **fields_include** (string) - Optional - Comma-separated list of fields to include in the response. Wildcards (*) can be used. - **fields_exclude** (string) - Optional - Comma-separated list of fields to exclude from the response. Wildcards (*) can be used as prefixes. - **order** (string) - Optional - Specifies the order for lists of resources. Supported orders are method-specific; defaults to 'natural'. ### Headers - **Authorization** (string) - Required - Bearer token for authentication. Format: "Bearer *token*" - **Api-Bb-Code-Chr** (string) - Optional - Replace multimedia tags (except YouTube) in bbcode html with 'tools/chr' link. - **Api-Username-Inline-Style** (string) - Optional - Return rich usernames for 'username' fields. ### Response #### Success Response (200) - **system_info** (object) - Information about the system. - **resources** (array) - A list of available resources. - **api_revisions** (object) - Revisions of the API system (if authenticated). - **installed_modules** (object) - Installed modules (if authenticated). #### Response Example ```json { "system_info": { "status": "available" }, "resources": [ "users", "posts" ], "api_revisions": { "v1": "1.2.3" }, "installed_modules": { "auth": "1.0.0" } } ``` ``` -------------------------------- ### Content Not Found Example Source: https://lolzteam.readme.io/reference/profilepostscommentsreport An example of an error response when the requested content is not found. ```APIDOC ## Example: ContentNotFound ### Description This example demonstrates the structure of a response when the requested content cannot be found. ### Response Example (ContentNotFound) ```json { "errors": [ "The requested ... could not be found." ], "system_info": { "visitor_id": 0, "time": 0 } } ``` ``` -------------------------------- ### Discoverability System Information Source: https://lolzteam.readme.io/reference/chatboxonline Retrieve system information and availability by sending a GET request to the index route. If authenticated, revisions of API system and installed modules will also be available. ```APIDOC ## GET / ### Description Discover the system information and availability of the API. If the request is authenticated, it will also return the revisions of the API system and installed modules. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **oauth_token** (string) - Optional - Used for authentication. #### Headers - **Authorization**: "**Bearer _token_**" - Used for authentication. ``` -------------------------------- ### Get System Info Source: https://lolzteam.readme.io/reference/searchall Retrieves general system information. This endpoint is secured and requires authentication. ```APIDOC ## GET /api/v1/system/info ### Description Retrieves general system information. This endpoint is secured and requires authentication. ### Method GET ### Endpoint /api/v1/system/info ### Security Requires HTTPBearer authentication. ### Responses #### Success Response (200) - **system_info** (object) - Contains system details including visitor ID and timestamp. #### Error Response (401) - **errors** (array of strings) - Details about the unauthorized access. #### Error Response (403) - **errors** (array of strings) - Details about the lack of permissions. - **system_info** (object) - Contains system details including visitor ID and timestamp. ``` -------------------------------- ### Get Filtered Content Tags Source: https://lolzteam.readme.io/reference/tagsfind Retrieves a filtered list of content tags. This endpoint allows you to search for tags that start with a specified query string. Requires 'read' scope for authorization. ```APIDOC ## GET /tags/find ### Description Filtered list of tags. Required scopes: + **read** ### Method GET ### Endpoint /tags/find ### Parameters #### Query Parameters - **tag** (string) - Required - tag to filter. Tags start with the query will be returned. ### Response #### Success Response (200) - **tags** (array[string]) - A list of matching tag names. - **ids** (array[integer]) - A list of IDs corresponding to the tags. - **system_info** (object) - System information about the response. #### Response Example ```json { "tags": [ "example_tag_1", "example_tag_2" ], "ids": [ 123, 456 ], "system_info": { "visitor_id": 1, "time": 1735689600, "log_id": 789 } } ``` #### Error Response (401) - **errors** (array[string]) - Details about the unauthorized access. #### Error Response Example (401) ```json { "errors": [ "Invalid or expired access token." ] } ``` #### Error Response (403) - **errors** (array[string]) - Details about the permission error. - **system_info** (object) - System information about the response. #### Error Response Example (403) ```json { "errors": [ "You do not have permission to view this page or perform this action." ], "system_info": { "visitor_id": 1, "time": 1735689600 } } ``` ``` -------------------------------- ### OpenAPI Definition Example Source: https://lolzteam.readme.io/reference/forumsget This is a sample OpenAPI definition. It includes details about the API's description, authentication scheme, and Readme-specific configurations for explorer, proxy, and samples. ```json { "description": "You can get your token [here](https://lolz.live/account/api).", "scheme": "bearer" } } } }, "x-readme": { "explorer-enabled": true, "proxy-enabled": true, "samples-enabled": true } } ``` -------------------------------- ### OpenAPI Definition Example Source: https://lolzteam.readme.io/reference/conversationsmessagescreate This snippet shows a portion of an OpenAPI definition file, including authentication scheme and explorer settings. ```yaml { "description": "You can get your token [here](https://lolz.live/account/api).", "scheme": "bearer" } } }, "x-readme": { "explorer-enabled": true, "proxy-enabled": true, "samples-enabled": true } } ``` -------------------------------- ### Example Authorization URL Source: https://lolzteam.readme.io/reference/oauth2 Initiates the OAuth2 authorization flow by redirecting the user to the authorization server. Ensure to replace placeholders with your application's specific details. ```url https://lzt.market/account/authorize?client_id=5ggftt92ww&response_type=token&scope=read%20post ``` ```url https://lolz.live/account/authorize?client_id=5ggftt92ww&response_type=token&scope=read+post&redirect_uri=https://lolzteam.readme.io/reference/oauth2 ``` -------------------------------- ### Token Configuration Source: https://lolzteam.readme.io/reference/formslist Instructions on how to configure and pass authentication tokens for API requests, either as a query parameter or in the request header. ```APIDOC ## Token configuration You can pass the token as a query parameter or in the request headers: * Query parameter: **oauth_token=_token_** * Header: **Authorization**: "**Bearer _token_**" ``` -------------------------------- ### OpenAPI Readme Extension Configuration Source: https://lolzteam.readme.io/reference/postsedit Configuration for Readme extensions, enabling explorer, proxy, and samples features for the API documentation. ```yaml { "x-readme": { "explorer-enabled": true, "proxy-enabled": true, "samples-enabled": true } } ``` -------------------------------- ### Get Forms List Source: https://lolzteam.readme.io/reference/formslist Retrieves a paginated list of forms. You can specify the page number to get a specific set of results. ```APIDOC ## GET /forms ### Description Retrieves a list of forms. This endpoint allows for pagination to manage large datasets. ### Method GET ### Endpoint /forms ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number of forms. ### Response #### Success Response (200) - **forms** (array) - An array of form objects. - **form_id** (integer) - The unique identifier for the form. - **title** (string) - The title of the form. - **description** (string) - A description of the form. - **fields** (array) - An array of field objects within the form. - **field_id** (integer) - The unique identifier for the field. - **title** (string) - The title of the field. - **fieldChoices** (object) - Contains choices for the field. - **buy** (string) - The 'buy' choice for the field. - **sell** (string) - The 'sell' choice for the field. - **required** (integer) - Indicates if the field is required (1 for true, 0 for false). - **max_length** (integer) - The maximum allowed length for the field's input. - **default_value** (string) - The default value for the field. - **formsPerPage** (integer) - The number of forms displayed per page. - **page** (integer) - The current page number. - **totalForms** (integer) - The total number of forms available. - **system_info** (object) - Information about the system. #### Response Example { "forms": [ { "form_id": 1, "title": "Example Form", "description": "This is an example form.", "fields": [ { "field_id": 101, "title": "Example Field", "fieldChoices": { "buy": "Buy Option", "sell": "Sell Option" }, "required": 1, "max_length": 100, "default_value": "" } ] } ], "formsPerPage": 10, "page": 1, "totalForms": 50, "system_info": {} } ``` -------------------------------- ### Unauthorized Error Example Source: https://lolzteam.readme.io/reference/forumsfollow This example shows the structure of an error response when authentication fails due to an invalid or expired access token. ```json { "errors": [ "Invalid or expired access token." ] } ``` -------------------------------- ### Get Shareable Thread Content Source: https://lolzteam.readme.io/reference/conversationssharecontent Retrieves a shareable version of a thread's content, with certain elements hidden. Requires 'get' and 'conversate' scopes. ```APIDOC ## GET /conversations/share-content ### Description Get a shareable thread content (hides). Required scopes: + **get** + **conversate** ### Method GET ### Endpoint /conversations/share-content ### Parameters #### Query Parameters - **thread_id** (integer) - Required - Id of thread. ### Response #### Success Response (200) - **content** (string) - The shareable content of the thread. - **system_info** (object) - System information related to the response. #### Response Example { "content": "Shareable thread content here...", "system_info": { "visitor_id": 1, "time": 1735689600, "log_id": 12345 } } #### Error Response (401) Unauthorized - Invalid or expired access token. #### Error Response (403) No Permission - You do not have permission to view this page or perform this action. ``` -------------------------------- ### Get System Info Source: https://lolzteam.readme.io/reference/conversationsget Retrieves system information, including visitor ID, time, and log ID. ```APIDOC ## GET /system/info ### Description Retrieves system information. ### Method GET ### Endpoint /system/info ### Response #### Success Response (200) - **visitor_id** (integer) - The visitor's unique identifier. - **time** (integer) - The current server time as a Unix timestamp. - **log_id** (integer) - The ID of the current log entry. #### Response Example { "visitor_id": 98765, "time": 1678886500, "log_id": 11223 } ``` -------------------------------- ### Unauthorized Response Schema and Example Source: https://lolzteam.readme.io/reference/usersignored Defines the schema for an 'Unauthorized' response, indicating an issue with the access token. An example shows the expected error message format. ```json { "content": { "application/json": { "schema": { "title": "Unauthorized", "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "string" } } } }, "examples": { "Unauthorized": { "summary": "Unauthorized", "value": { "errors": [ "Invalid or expired access token." ] } } } } }, "description": "Unauthorized" } ``` -------------------------------- ### No Permission Error Schema and Example Source: https://lolzteam.readme.io/reference/usersignored Defines the schema for a 'No Permission Error' response, which includes an array of error messages and system information. An example demonstrates the structure with a specific error message. ```json { "schema": { "title": "No Permission Error", "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "string", "default": "You do not have permission to view this page or perform this action." } }, "system_info": { "$ref": "#/components/schemas/Resp_SystemInfo" } } }, "examples": { "NoPermission": { "summary": "No permission", "value": { "errors": [ "You do not have permission to view this page or perform this action." ], "system_info": { "visitor_id": 1, "time": 1735689600 } } } } } ``` -------------------------------- ### Search.All Source: https://lolzteam.readme.io/reference/searchall Search for all supported contents. This endpoint allows for flexible searching based on query, tag, forum, user, and pagination. ```APIDOC ## POST /search ### Description Search for all supported contents. Required scopes: + **post** ### Method POST ### Endpoint /search ### Parameters #### Request Body - **q** (string) - Optional - Search query. Can be skipped if **user_id** is set. - **tag** (string) - Optional - Tag to search for tagged contents. - **forum_id** (integer) - Optional - Id of the container forum to search for contents. Child forums of the specified forum will be included in the search. - **user_id** (UserIDModel) - Optional - User ID to search for. - **page** (integer) - Optional - Page number of results. - **limit** (integer) - Optional - Number of results in a page. - **before** (integer) - Optional - The time in milliseconds (e.g. 1767214800) before last content date. ### Response #### Success Response (200) - **data** (array) - Array of search results. Can contain threads, posts, profile posts, or profile post comments. - **data_total** (integer) - Total number of results found. - **users** (array) - Array of user models associated with the search results. - **links** (object) - Pagination links. - **pages** (integer) - Total number of pages. - **page** (integer) - Current page number. - **next** (string) - URL for the next page. - **system_info** (object) - System information. #### Response Example { "data": [ { "content_type": "thread", "thread_id": 123, "title": "Example Thread" }, { "content_type": "post", "post_id": 456, "text": "Example Post Content" } ], "data_total": 100, "users": [ { "user_id": 789, "username": "example_user" } ], "links": { "pages": 10, "page": 1, "next": "/search?page=2" }, "system_info": { "api_version": "1.0" } } ``` -------------------------------- ### Get Following Source: https://lolzteam.readme.io/reference/usersfollow Retrieves a list of users that the specified user is following. ```APIDOC ## GET /users/{user_id}/following ### Description Gets a list of users the specified user is following. ### Method GET ### Endpoint /users/{user_id}/following ### Parameters #### Path Parameters - **user_id** (integer | string) - Required - The ID of the user whose following list to retrieve. ### Response #### Success Response (200) - **users** (array) - A list of user objects. - **user_id** (integer | string) - The ID of the user being followed. - **username** (string) - The username of the user being followed. #### Response Example { "users": [ { "user_id": 789, "username": "following1" }, { "user_id": 101, "username": "following2" } ] } ``` -------------------------------- ### Get Followers Source: https://lolzteam.readme.io/reference/usersfollow Retrieves a list of users who are following the specified user. ```APIDOC ## GET /users/{user_id}/followers ### Description Gets a list of followers for the specified user. ### Method GET ### Endpoint /users/{user_id}/followers ### Parameters #### Path Parameters - **user_id** (integer | string) - Required - The ID of the user whose followers to retrieve. ### Response #### Success Response (200) - **users** (array) - A list of user objects. - **user_id** (integer | string) - The ID of the follower. - **username** (string) - The username of the follower. #### Response Example { "users": [ { "user_id": 123, "username": "follower1" }, { "user_id": 456, "username": "follower2" } ] } ```