Docs

getRedirectUrl()

Retrieves a single redirect URL by its ID, if the ID is valid.

function getRedirectUrl: (redirectUrlId: string) => Promise<RedirectUrl>;
  • Name
    redirectUrlId
    Type
    string
    Description

    The ID of the redirect URL to retrieve.

const redirectUrlId = 'ru_2bxLHVfYsA13r8iKHWoY8SAr9az';

const response = await clerkClient.redirectUrls.getRedirectUrl(redirectUrlId);

console.log(response);
/*
_RedirectUrl {
  id: 'ru_2bxLHVfYsA13r8iKHWoY8SAr9az',
  url: 'https://example.com',
  createdAt: 1707151695693,
  updatedAt: 1707151695693
}
*/

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint GET/redirect_urls/{id}. See the BAPI reference for more details.

Feedback

What did you think of this content?