āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/clerk/clerk-docs/reference/backend/oauth-applications/create ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
create()'
description: Use Clerk's JS Backend SDK to create an OAuth application.
sdk: js-backendCreates a new OAuthApplication.
function create(params: CreateOAuthApplicationParams): Promise<OAuthApplication>
CreateOAuthApplicationParamsThe name of the OAuth application.
redirectUris?string[] | nullAn array of redirect URIs for the OAuth application.
scopes?string[] | null | undefinedScopes for the OAuth application. Available scopes are profile, email, public_metadata, private_metadata. Defaults to profile email. Provide the requested scopes as a string, separated by spaces.
consentScreenEnabled?boolean | null | undefinedSpecifies whether the consent screen should be displayed in the authentication flow. Cannot be disabled for dynamically registered OAuth applications. Defaults to true.
public?boolean | null | undefinedIndicates whether the client is public. If true, the Proof Key of Code Exchange (PKCE) flow can be used. </Properties>
const response = await clerkClient.oauthApplications.create({
name: 'oauthapp_123',
redirect_uris: [''],
scopes: 'profile email public_metadata',
public: null,
})
This method in the SDK is a wrapper around the BAPI endpoint POST/oauth_applications. See the BAPI reference{{ target: '_blank' }} for more information.
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā