createRedirectUrl()
Creates a redirect URL.
function createRedirectUrl: (params: createRedirectUrlParams) => Promise<RedirectUrl>;
createRedirectUrlParams
Name | Type | Description |
---|---|---|
url | string | The 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.