HL Gaming Official API Documentation – Posts (Access, Create, Manage, Delete & Search)




HL Gaming Official API Documentation – Posts Endpoints
Welcome to the complete and comprehensive documentation for the posts endpoints of the HL Gaming Official API. In this guide, you will find detailed information on how to create, retrieve, search, and delete posts using GET requests (for demonstration purposes, although a POST would be ideal for data creation).
Key Functionalities:
  • Post Creation: Publish new posts with a title, content, and optional media (image, video, link).
  • Post Retrieval: Retrieve all posts created by you, with sorting based on timestamps (most recent first).
  • Post Searching: Perform a robust, case‑insensitive search on your posts using queries that scan both title and content. Optional field filtering is supported.
  • Post Deletion: Delete your posts securely, ensuring that only posts belonging to your authenticated useruid can be removed.
Each API response comes with detailed usage statistics—allowing you to monitor your daily quota usage—and error messages that aid in troubleshooting and ensuring smooth integration.
🚫 Usage Limit Alert: All API requests are subject to a daily quota. Check the usage object in every response to avoid exceeding your limit.
🚨 Security & Authentication: These endpoints strictly enforce that only posts linked with your useruid are accessible and mutable. Do not expose your useruid or api key in client-side code!
ℹ️ Note: Even though all calls are made with GET for demonstration purposes, you should adapt POST (or other HTTP methods) in your production application.
Endpoint Parameters
To securely communicate with the posts endpoints, you must provide the following query parameters with every request:
Parameter Requirement Description
sectionName Required Must be set to posts to indicate that the request is for post management operations.
useruid Required Your unique developer identifier used for authentication and quota tracking. Only posts associated with this ID will be managed.
api Required Your secret API key, which authenticates your request. Keep this value confidential.
type Required Specifies the operation to be performed. Valid values are:
  • create – Publish a new post.
  • fetch – Retrieve all your posts.
  • search – Search posts for specific keywords.
  • delete – Remove a post.
title Conditionally Required Required when type=create. This is the title of the post.
content Conditionally Required Required when type=create. This is the main body of your post.
imageUrl Optional URL to an image that may accompany your post. Use null if there is no image.
videoUrl Optional URL to a video for your post. Use null if not applicable.
link Optional A related external URL that complements your post content.
q For Search Specifies the search term used to filter posts. The search is performed case‑insensitively against both title and content.
fields Optional (For Search) A comma-separated list that denotes which post fields to return (for example, title,content,username). The special value * returns all fields.
postId For Delete The unique identifier of the post you wish to delete. Deletion can only proceed if the post belongs to the current useruid.
Error Responses
  • {"error":"Missing required parameters"} – One or more required parameters were not provided.
  • {"error":"Auth Failed! Please Check Your User ID & Try Again.."} – The supplied useruid is invalid or missing.
  • {"error":"Invalid API key. Obtain an official key from https://www.hlgamingofficial.com/p/api.html"} – The API key provided does not match our records.
  • {"error":"Unauthorized: Post not found or not owned by the user"} – Attempted deletion on a post that does not belong to the authenticated user.
  • {"error":"Server error or external API issue. Try again later."} – An unexpected internal or upstream error occurred.
API Operations & Use Cases
The posts endpoints support four primary operations. In the sections below, you will find a detailed explanation for each.
1. Create a New Post:
  • type=create must be included together with both title and content.
  • The optional parameters imageUrl, videoUrl, and link can be used if you wish to include media or external resources.
  • Upon success, a JSON response is returned that confirms the publication and provides a unique postId for the new post.
  • This endpoint can be used to quickly create status updates, announcements, or any content you wish to distribute on your profile.
2. Fetch All Posts:
  • type=fetch retrieves all posts that belong to the authenticated user.
  • The posts are sorted locally in descending order by their timestamp, ensuring the most recent posts are always listed first.
  • The response contains a full set of details for each post including media URLs, timestamps, and counters for likes, dislikes, and views.
  • This operation is ideal for constructing a posts feed or dashboard view within your application.
3. Search Posts:
  • type=search enables case‑insensitive searching against your posts.
  • The search term provided via q is matched against both the lower-case versions of the title and content (titleLower and contentLower).
  • An optional fields parameter allows you to restrict the output to selected fields (for example: title,content,username).
  • This operation is particularly useful when filtering posts to highlight specific topics or themes within your content.
4. Delete a Post:
  • type=delete requires the postId of the post to be deleted.
  • Deletion is securely limited to posts that were created by the user associated with the provided useruid.
  • On successful deletion, the API returns a confirmation message along with the deleted postId.
  • This endpoint should be used with caution and only after confirming that the post belongs to the authenticated user.
Example API Requests
The examples below show how to structure your GET requests for each of the operations. Replace YOUR_USER_UID, YOUR_API_KEY, and any placeholder values with your actual data.
1. Create a New Post:
curl -X GET "https://hl-gaming-official-main-api-v2-upgraded.vercel.app/api?sectionName=posts&useruid=YOUR_USER_UID&api=YOUR_API_KEY&type=create&title=New%20Features%20Coming%20Soon!&content=Wait%20Players%2C%20New%20Features%20Coming%20Soon............&imageUrl=null&videoUrl=null&link="
2. Fetch All Posts:
curl -X GET "https://hl-gaming-official-main-api-v2-upgraded.vercel.app/api?sectionName=posts&useruid=YOUR_USER_UID&api=YOUR_API_KEY&type=fetch"
3. Search Posts (Full Data):
curl -X GET "https://hl-gaming-official-main-api-v2-upgraded.vercel.app/api?sectionName=posts&useruid=YOUR_USER_UID&api=YOUR_API_KEY&type=search&q=features"
4. Search Posts (Limited Fields):
curl -X GET "https://hl-gaming-official-main-api-v2-upgraded.vercel.app/api?sectionName=posts&useruid=YOUR_USER_UID&api=YOUR_API_KEY&type=search&q=features&fields=title,content,username"
5. Delete a Post:
curl -X GET "https://hl-gaming-official-main-api-v2-upgraded.vercel.app/api?sectionName=posts&useruid=YOUR_USER_UID&api=YOUR_API_KEY&type=delete&postId=POST_ID_TO_DELETE"
Example Output Responses
The following sample responses illustrate what you will receive when interacting with the posts endpoints.
A. Successful Post Creation:
{ "source": "HL Gaming Official", "endpoint": "posts/create", "result": { "message": "Post published successfully", "postId": "GENERATED_POST_ID" }, "usage": { "usedToday": 1, "dailyLimit": 1000, "remainingToday": 999 } }
B. Successful Fetch Operation:
{ "source": "HL Gaming Official", "endpoint": "posts/fetch", "result": { "posts": [ { "id": "POST_ID_1", "userId": "YOUR_USER_UID", "username": "YourUsername", "title": "New Features Coming Soon!", "content": "Wait Players, New Features Coming Soon............", "imageUrl": null, "videoUrl": null, "link": "", "timestamp": "2025-04-15T13:47:01.000Z", "likes": 0, "dislikes": 0, "views": 0, "titleLower": "new features coming soon!", "contentLower": "wait players, new features coming soon............" }, ... ] }, "usage": { "usedToday": 2, "dailyLimit": 1000, "remainingToday": 998 } }
C. Successful Search Operation (Full Data):
{ "source": "HL Gaming Official", "endpoint": "posts/search", "result": { "posts": [ { "id": "POST_ID_1", "userId": "YOUR_USER_UID", "username": "YourUsername", "title": "New Features Coming Soon!", "content": "Wait Players, New Features Coming Soon............", "imageUrl": null, "videoUrl": null, "link": "", "timestamp": "2025-04-15T13:47:01.000Z", "likes": 0, "dislikes": 0, "views": 0, "titleLower": "new features coming soon!", "contentLower": "wait players, new features coming soon............" } ] }, "usage": { "usedToday": 3, "dailyLimit": 1000, "remainingToday": 997 } }
D. Successful Search Operation (Limited Fields):
{ "source": "HL Gaming Official", "endpoint": "posts/search", "result": { "posts": [ { "id": "POST_ID_1", "title": "New Features Coming Soon!", "content": "Wait Players, New Features Coming Soon............", "username": "YourUsername" } ] }, "usage": { "usedToday": 4, "dailyLimit": 1000, "remainingToday": 996 } }
E. Successful Delete Operation:
{ "source": "HL Gaming Official", "endpoint": "posts/delete", "result": { "message": "Post deleted successfully", "postId": "POST_ID_TO_DELETE" }, "usage": { "usedToday": 5, "dailyLimit": 1000, "remainingToday": 995 } }
Obtaining Your Credentials
In order to use the posts endpoints of the HL Gaming Official API, you must secure a valid useruid and api key during the registration process. These credentials authenticate your requests and ensure that you only manage your own posts.
Credential Description
useruid Your unique developer ID used for API authentication and tracking your API calls. Only posts created with this useruid are accessible through the endpoints.
api Your secret API key. Keep this confidential and do not expose it in any client-side code.
API Usage Examples
The code samples below illustrate how to integrate the posts endpoints into your applications. They cover various operations (create, fetch, search, delete) in different programming languages. Replace placeholder values with actual data.

    
FAQ & Best Practices
Q1: What is the primary purpose of these posts endpoints?
A: These endpoints allow you to manage your published posts on the HL Gaming Official platform. You can create new posts, retrieve all your posts, perform advanced searches, and delete posts—all restricted to your account for security and data integrity.
Q2: How does the search operation work in detail?
A: The search operation (type=search) takes a query parameter (q) and matches it against the lower-cased values of both the title and content of your posts. This ensures case‑insensitive matching. Optionally, the fields parameter lets you restrict the response to only certain fields. This is useful for lightweight queries or when you need to display a summary.
Q3: Why are the operations strictly limited to my own posts?
A: For security and data consistency, each API call is filtered by your useruid. This guarantees that only posts created by you are returned or allowed to be modified/deleted.
Q4: How can I best monitor and secure my API usage?
A: Every API response includes a usage object detailing your daily limit, the number of calls used, and the remaining quota. Monitor this object to prevent exceeding your daily limit. In addition, secure your credentials by making all calls from your server-side code.
Q5: What error handling strategies should I adopt?
A: Implement proper error handling by checking for error messages in the JSON response. Log and monitor errors such as missing parameters, authentication failures, and authorization errors. Use fallback logic when necessary, especially when nearing your quota limit.
Best Practices:
  • Never expose your useruid or api key in client-side code; always store credentials securely on your server.
  • Cache common requests and responses to minimize calls and reduce latency.
  • Ensure that deletion and other destructive operations are only carried out after confirming the post ownership.
  • Implement graceful error recovery and informative user feedback when an error is encountered.
  • Monitor usage statistics to optimize your application’s API call patterns and avoid service disruption.
HL Gaming Official API Documentation – Posts Endpoints © 2025
Continue Reading
You are offline. Connect to the internet.
🔔
Notifications
LIVE

LIVE Actions

Select an action: