getRedirectUrl()
Retrieves a single redirect URL by its ID, if the ID is valid.
function getRedirectUrl: (redirectUrlId: string) => Promise<RedirectUrl>;
getRedirectUrl()
parameters
Name | Type | Description |
---|---|---|
redirectUrlId | string | The 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.