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

createRedirectUrl()

Creates a redirect URL.

function createRedirectUrl: (params: createRedirectUrlParams) => Promise<RedirectUrl>;

createRedirectUrlParams

NameTypeDescription
urlstringThe full url value prefixed with https:// or a custom scheme. For example, https://my-app.com/oauth-callback or my-app://oauth-callback

createRedirectUrl() example

const response = await clerkClient.redirectUrls.createRedirectUrl({ url: "https://example.com" }) 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 POST/redirect_urls. See the BAPI reference(opens in a new tab) for more details.

What did you think of this content?

Clerk © 2024