Skip to content

Get user info endpoint

Alvin Cheng edited this page Apr 23, 2023 · 3 revisions

Description

This is the get user endpoint, as the name suggests the endpoint will get the user info of a specified user, the source of this endpoint can be found at: /src/endpoints/getUserInfo.ts. This endpoint will return '200' on success, '401' on incorrect API key or '500' on internal server error. Furthermore, this endpoint will expect a 'username' argument which is the username of the user to search.

Example

fetch("http://<URL>/api/get-user-info?key=<YOUR_API_KEY>&user=<USER>")
  .then((res) => {
    console.log(res);
  })
  .catch((err) => {
    console.error(err);
  });
Clone this wiki locally