Opslink Servers API

OpsLink provides a secure REST + Socket.IO API for authentication, server listings, moderation, reviews, and QR-based login.


circle-exclamation

πŸš€ Onboarding

Base URL

https://opslinkservers-backend.onrender.com/api

Requirements

  • HTTPS client

  • JSON support

  • JWT storage (localStorage or memory)


πŸ” Authentication

Login Flow

1

User logs in

Client sends credentials to the login endpoint.

2

Server returns JWT

On successful authentication the server responds with a JWT and user info.

3

JWT sent via Authorization header

For subsequent authenticated requests include the token:

Authorization: Bearer YOUR_JWT_TOKEN

Token Invalidation

  • Password change invalidates old tokens

  • Token version mismatch β†’ 401


πŸ‘€ Auth Endpoints

POST /auth/login

Request

Response


πŸ“± QR Login (Socket.IO)

Flow: Desktop β†’ QR Token Mobile β†’ Scan β†’ Approve Socket β†’ JWT delivered

GET /auth/qr-generate

Response

Socket.IO Subscribe


🌐 Server Listings

GET /servers

Response

POST /servers Auth Required

Request


⭐ Reviews

POST /servers/:id/reviews Auth Required

Request


πŸ›  Admin API

PATCH /admin/servers/:id/status Admin

Request


πŸ“¦ SDKs


🚦 Rate Limits

  • Auth: 10 req/min

  • General API: 60 req/min

  • QR Login: 5 req/min


🚨 Errors

chevron-rightStatus Codeshashtag
  • 400 – Bad Request

  • 401 – Unauthorized

  • 403 – Forbidden

  • 404 – Not Found

  • 500 – Server Error


πŸ” Security

  • JWT validation

  • CORS allowlist

  • Socket room isolation


βœ… You Are Done

This documentation is production-ready and public-facing.

Last updated