Skip to Content
You are viewing a beta version of Clerk Docs
Visit the latest docs
Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.com

getRedirectUrl()

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

function getRedirectUrl: (redirectUrlId: string) => Promise<RedirectUrl>;

getRedirectUrl() parameters

NameTypeDescription
redirectUrlIdstringThe ID of the redirect URL to retrieve.

getRedirectUrl() example

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(opens in a new tab) for more details.

What did you think of this content?

Clerk © 2024