Docs

createRedirectUrl()

Creates a RedirectUrl.

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_123',
  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 information.

Feedback

What did you think of this content?

Last updated on