Docs

createRedirectUrl()

Creates a redirect URL.

function createRedirectUrl: (params: createRedirectUrlParams) => Promise<RedirectUrl>;
  • Name
    url
    Type
    string
    Description

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

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 for more details.

Feedback

What did you think of this content?