Skip to main content

Endpoint

GET /get-redirects/me

Function signature

export const getUserRedirects = async (): Promise<AxiosResponse>

Parameters

This endpoint does not require any parameters. It automatically fetches redirects for the authenticated user.

Response

status
number
HTTP status code
data
array
Array of redirect objects

Code example

import { getUserRedirects } from '@/lib/api';

const fetchRedirects = async () => {
  const response = await getUserRedirects();
  const redirects = response.data;
  
  console.log(`Total redirects: ${redirects.length}`);
  return redirects;
};
This endpoint requires authentication. Ensure the user is logged in before making this request.

Error responses