### GET get Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.RenderingClient.html Retrieves the render settings for a specific prompt and screen. ```APIDOC ## GET get ### Description Fetches the current render settings for a specified prompt and screen combination. ### Parameters #### Path Parameters - **prompt** (PromptGroupNameEnum) - Required - The name of the prompt. - **screen** (ScreenGroupNameEnum) - Required - The name of the screen. #### Query Parameters - **requestOptions** (RequestOptions) - Optional - Request-specific configuration. ### Response #### Success Response (200) - **response** (GetAculResponseContent) - The render settings for the requested screen. ``` -------------------------------- ### ConnectionsGetRequest Example Object Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ConnectionsGetRequest.html An example object demonstrating the structure of a ConnectionsGetRequest. This can be used to filter connection retrieval by strategy, starting point, number of results, and specific fields. ```json { from: "from", take: 1, fields: "fields", include_fields: true } ``` -------------------------------- ### CreateUserRequestContent Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.CreateUserRequestContent.html A minimal example showing the required connection property for the user creation request. ```json { * connection: "connection" * } ``` -------------------------------- ### CreateOrganizationRequestContent Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.CreateOrganizationRequestContent.html A basic example showing the required structure for an organization creation request. ```json { name: "name" } ``` -------------------------------- ### ListScimConfigurationsRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListScimConfigurationsRequestParameters.html An example of how to structure the ListScimConfigurationsRequestParameters object, specifying 'from' and 'take' for pagination. ```json { "from": "from", "take": 1 } ``` -------------------------------- ### Example Usage of CreateOrganizationAllConnectionRequestParameters Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.CreateOrganizationAllConnectionRequestParameters.html An example object demonstrating the structure for creating an organization connection, specifying the connection_id. ```json { * connection_id: "connection_id" * } ``` -------------------------------- ### CreateActionRequestContent Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.CreateActionRequestContent.html A basic example showing the structure of a request object for creating an action. ```json { * name: "name", * supported_triggers: [{ * id: "post-login" * }] * } ``` -------------------------------- ### Create HTTP Log Stream Example Source: https://github.com/auth0/node-auth0/blob/master/docs/media/reference.md Example usage of the `create` method for an HTTP log stream. Ensure the client and necessary imports are available. ```typescript await client.logStreams.create({ type: "http", sink: { httpEndpoint: "httpEndpoint", }, }); ``` -------------------------------- ### CreateEncryptionKeyRequestContent Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.CreateEncryptionKeyRequestContent.html This example shows the structure for a customer-provided root key when creating an encryption key. Ensure the 'type' property is set to 'customer-provided-root-key'. ```json { "type": "customer-provided-root-key" } ``` -------------------------------- ### Create Resource Server Request Content Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.CreateResourceServerRequestContent.html This example demonstrates the structure for creating resource server content. Ensure the 'identifier' field is always provided. ```json { identifier: "identifier" } ``` -------------------------------- ### ListRolesRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListRolesRequestParameters.html An example object demonstrating the structure of parameters used for listing roles. ```json { * per_page: 1, * page: 1, * include_totals: true, * name_filter: "name_filter" * } ``` -------------------------------- ### Example Usage of CreateEmailProviderRequestContent Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.CreateEmailProviderRequestContent.html A basic example showing the structure of an email provider request object. ```json { name: "mailgun", credentials: { api_key: "api_key" } } ``` -------------------------------- ### Example Usage of ListUserLogsRequestParameters Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListUserLogsRequestParameters.html An example object demonstrating the structure of the request parameters. ```json { page: 1, per_page: 1, sort: "sort", include_totals: true } ``` -------------------------------- ### ListEncryptionKeysRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListEncryptionKeysRequestParameters.html An example object demonstrating the structure of ListEncryptionKeysRequestParameters. Use these parameters to control pagination and the inclusion of total counts in the response. ```json { page: 1, per_page: 1, include_totals: true } ``` -------------------------------- ### Usage Example for GetConnectionEnabledClientsRequestParameters Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.GetConnectionEnabledClientsRequestParameters.html Example object structure for the request parameters. ```json { * take: 1, * from: "from" * } ``` -------------------------------- ### ListRolePermissionsRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListRolePermissionsRequestParameters.html An example object demonstrating the structure of request parameters for role permissions. ```json { * per_page: 1, * page: 1, * include_totals: true * } ``` -------------------------------- ### ListResourceServerRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListResourceServerRequestParameters.html An example object demonstrating the structure of ListResourceServerRequestParameters for API requests. ```json { page: 1, per_page: 1, include_totals: true, include_fields: true } ``` -------------------------------- ### ListClientGrantOrganizationsRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListClientGrantOrganizationsRequestParameters.html Example of how to define ListClientGrantOrganizationsRequestParameters with 'from' and 'take' properties for pagination. ```typescript { from: "from", take: 1 } ``` -------------------------------- ### ListUsersByEmailRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListUsersByEmailRequestParameters.html An example of how to structure the parameters for listing users by email. This includes optional fields for specifying which fields to include and a required email address. ```json { fields: "fields", include_fields: true, email: "email" } ``` -------------------------------- ### ListUserBlocksRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListUserBlocksRequestParameters.html An example of how to use the ListUserBlocksRequestParameters interface to specify considering brute force enablement. ```json { "consider_brute_force_enablement": true } ``` -------------------------------- ### Basic Setup for AuthenticationClient Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/auth.AuthenticationClient.html Instantiate the AuthenticationClient with your Auth0 tenant domain and client ID. ```javascript import { AuthenticationClient } from 'auth0'; const auth0 = new AuthenticationClient({ domain: 'your-tenant.auth0.com', clientId: 'your-client-id' }); ``` -------------------------------- ### Manage User Authentication Methods (Node.js) Source: https://github.com/auth0/node-auth0/blob/master/v5_MIGRATION_GUIDE.md This snippet demonstrates how to manage user authentication methods using the Auth0 Node.js SDK. It covers getting, deleting, and updating authentication methods for a user. Ensure the SDK is installed and authenticated. ```javascript const auth0 = require('auth0').ManagementAPI({ domain: 'YOUR_DOMAIN', token: 'YOUR_API_TOKEN' }); async function manageAuthMethods(userId) { try { // Get authentication methods const methods = await auth0.users.getAuthenticationMethod(userId); console.log('Authentication Methods:', methods); // Example: Delete an authentication method (replace 'methodId' with actual ID) // await auth0.users.deleteAuthenticationMethod(userId, 'methodId'); // console.log('Authentication method deleted.'); // Example: Update an authentication method (replace 'methodId' with actual ID and provide update data) // const updateData = { ... }; // await auth0.users.updateAuthenticationMethod(userId, 'methodId', updateData); // console.log('Authentication method updated.'); } catch (error) { console.error('Error managing authentication methods:', error); } } // manageAuthMethods('auth0|userId'); ``` -------------------------------- ### Create User Attribute Profile Request Content Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.CreateUserAttributeProfileRequestContent.html This example demonstrates the structure of a request to create user attribute profile content. It includes the name and user attributes with their respective configurations. ```json { name: "name", user_attributes: { "key": { description: "description", label: "label", profile_required: true, auth0_mapping: "auth0_mapping" } } } ``` -------------------------------- ### List directory provisioning configurations Source: https://github.com/auth0/node-auth0/blob/master/docs/media/reference.md Demonstrates how to list directory provisioning configurations using async iteration or manual pagination. ```typescript const pageableResponse = await client.connections.directoryProvisioning.list({ from: "from", take: 1, }); for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page let page = await client.connections.directoryProvisioning.list({ from: "from", take: 1, }); while (page.hasNextPage()) { page = page.getNextPage(); } // You can also access the underlying response const response = page.response; ``` -------------------------------- ### Configure ManagementClient with Token Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.ManagementClient.ManagementClientOptionsWithToken.html Examples for initializing the ManagementClient using either a static token string or a dynamic supplier function. ```javascript const client = new ManagementClient({ domain: 'your-tenant.auth0.com', token: 'your-static-token'}); ``` ```javascript const client = new ManagementClient({ domain: 'your-tenant.auth0.com', token: () => getAccessToken() // Function that returns a token}); ``` -------------------------------- ### ListOrganizationConnectionsRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListOrganizationConnectionsRequestParameters.html This example shows how to set pagination parameters for listing organization connections. Use 'page' for the page number, 'per_page' for the number of results, and 'include_totals' to get the total count. ```typescript { page: 1, per_page: 1, include_totals: true } ``` -------------------------------- ### GetClientRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.GetClientRequestParameters.html This example shows how to define parameters for a client request, specifying fields to include and a boolean to indicate whether these fields should be included. ```typescript { fields: "fields", include_fields: true } ``` ```typescript interface GetClientRequestParameters { [fields](#fields)?: string | null; [include_fields](#include_fields)?: boolean | null; } ``` -------------------------------- ### AuthenticationClient Setup Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/auth.AuthenticationClient.html Instantiate the AuthenticationClient with your Auth0 domain and client ID. ```APIDOC ## AuthenticationClient Setup ### Description Instantiate the AuthenticationClient with your Auth0 domain and client ID. ### Request Body - **domain** (string) - Required - Your Auth0 domain (e.g., 'your-tenant.auth0.com'). - **clientId** (string) - Required - Your Auth0 application's client ID. ### Request Example ```json { "domain": "your-tenant.auth0.com", "clientId": "your-client-id" } ``` ### Response #### Success Response (200) - **AuthenticationClient** (object) - An instance of the AuthenticationClient. #### Response Example ```javascript import { AuthenticationClient } from 'auth0'; const auth0 = new AuthenticationClient({ domain: 'your-tenant.auth0.com', clientId: 'your-client-id' }); ``` ``` -------------------------------- ### Example Usage of ErrorsClient.get Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.ErrorsClient.html Demonstrates how to call the get method on the ErrorsClient to retrieve error details for a job. ```javascript await client.jobs.errors.get("id") ``` -------------------------------- ### GET /api/v2/user-attribute-profiles/templates Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.UserAttributeProfilesClient.html Retrieves a list of available user attribute profile templates. These templates can serve as a starting point for creating new user attribute profiles. ```APIDOC ## GET /api/v2/user-attribute-profiles/templates ### Description Retrieves a list of available user attribute profile templates. These templates can serve as a starting point for creating new user attribute profiles. ### Method GET ### Endpoint /api/v2/user-attribute-profiles/templates ### Parameters #### Query Parameters - **requestOptions** (UserAttributeProfilesClient.RequestOptions) - Optional - Request-specific configuration. ### Response #### Success Response (200) - **ListUserAttributeProfileTemplateResponseContent** - A list of user attribute profile templates. #### Response Example ```json [ { "name": "template_name_1", "user_attributes": { "key1": { "description": "desc1", "label": "label1" } } }, { "name": "template_name_2", "user_attributes": { "key2": { "description": "desc2", "label": "label2" } } } ] ``` ### Errors - Management.UnauthorizedError - Management.ForbiddenError - Management.TooManyRequestsError ``` -------------------------------- ### Manage Encryption Keys (Node.js) Source: https://github.com/auth0/node-auth0/blob/master/v5_MIGRATION_GUIDE.md This snippet shows how to manage encryption keys using the Auth0 Node.js SDK. It covers listing, creating, getting, deleting, and importing encryption keys. These are crucial for data security. ```javascript const auth0 = require('auth0').ManagementAPI({ domain: 'YOUR_DOMAIN', token: 'YOUR_API_TOKEN' }); async function manageEncryptionKeys() { try { // Get all encryption keys const keys = await auth0.keys.getAllEncryptionKeys(); console.log('Encryption Keys:', keys); // Create an encryption key (example) // const createPayload = { ... }; // Provide key details // await auth0.keys.createEncryptionKey(createPayload); // console.log('Encryption key created.'); // Get a specific encryption key (replace 'keyId' with actual ID) // const key = await auth0.keys.getEncryptionKey('keyId'); // console.log('Specific Encryption Key:', key); // Import an encryption key (example) // const importPayload = { ... }; // Provide key material and details // await auth0.keys.importEncryptionKey(importPayload); // console.log('Encryption key imported.'); // Delete an encryption key (replace 'keyId' with actual ID) // await auth0.keys.deleteEncryptionKey('keyId'); // console.log('Encryption key deleted.'); } catch (error) { console.error('Error managing encryption keys:', error); } } // manageEncryptionKeys(); ``` -------------------------------- ### ManagementClient Initialization Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.ManagementClient.html Examples of how to initialize the ManagementClient using different authentication strategies. ```APIDOC ## ManagementClient Initialization ### Description Initializes the Auth0 Management API client wrapper. The client can be configured using client credentials (secret or assertion) or an existing static token. ### Request Example (Client Secret) ```javascript const client = new ManagementClient({ domain: 'your-tenant.auth0.com', clientId: 'your-client-id', clientSecret: 'your-client-secret' }); ``` ### Request Example (Client Assertion) ```javascript const client = new ManagementClient({ domain: 'your-tenant.auth0.com', clientId: 'your-client-id', clientAssertionSigningKey: 'your-private-key' }); ``` ### Request Example (Existing Token) ```javascript const client = new ManagementClient({ domain: 'your-tenant.auth0.com', token: 'your-static-token' }); ``` ``` -------------------------------- ### Manage Prompts Rendering (Node.js) Source: https://github.com/auth0/node-auth0/blob/master/v5_MIGRATION_GUIDE.md This snippet demonstrates managing prompt rendering settings using the Auth0 Node.js SDK. It covers getting and updating rendering configurations. These settings control how prompts are displayed to users. ```javascript const auth0 = require('auth0').ManagementAPI({ domain: 'YOUR_DOMAIN', token: 'YOUR_API_TOKEN' }); async function managePromptRendering() { try { // Get prompt rendering settings const rendering = await auth0.prompts.getRendering(); console.log('Prompt Rendering Settings:', rendering); // Update prompt rendering settings (example) // const updateData = { ... }; // Provide updated settings // await auth0.prompts.updateRendering(updateData); // console.log('Prompt rendering settings updated.'); } catch (error) { console.error('Error managing prompt rendering:', error); } } // managePromptRendering(); ``` -------------------------------- ### Create Import Users Request Content Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.CreateImportUsersRequestContent.html This example shows how to structure the content for importing users, specifying the file containing user data and the target connection ID. Ensure the 'users' property points to a readable file stream. ```javascript { users: fs.createReadStream("/path/to/your/file"), connection_id: "connection_id" } ``` -------------------------------- ### Manage Connections Enabled Clients (Node.js) Source: https://github.com/auth0/node-auth0/blob/master/v5_MIGRATION_GUIDE.md This snippet demonstrates managing clients enabled for specific connections using the Auth0 Node.js SDK. It covers getting and updating this association. This is useful for controlling which applications can use certain authentication connections. ```javascript const auth0 = require('auth0').ManagementAPI({ domain: 'YOUR_DOMAIN', token: 'YOUR_API_TOKEN' }); async function manageConnectionClients(connectionId) { try { // Get clients enabled for a connection const clients = await auth0.connections.getEnabledClients(connectionId); console.log(`Clients enabled for connection ${connectionId}:`, clients); // Update clients enabled for a connection (example) // const updatePayload = { enabled_clients: ['clientId1', 'clientId2'] }; // await auth0.connections.updateEnabledClients(connectionId, updatePayload); // console.log(`Clients for connection ${connectionId} updated.`); } catch (error) { console.error('Error managing connection enabled clients:', error); } } // manageConnectionClients('con_connectionId'); ``` -------------------------------- ### Auth0 UserInfoClient: Get User Profile Source: https://context7.com/auth0/node-auth0/llms.txt Retrieve user profile information using an access token with the UserInfoClient. This example demonstrates how to fetch details like user ID (sub), email, name, and profile picture. It requires a valid user access token. ```typescript import { UserInfoClient } from "auth0"; const userInfo = new UserInfoClient({ domain: "your-tenant.us.auth0.com", }); // Get user profile with access token const profile = await userInfo.getUserInfo("USER_ACCESS_TOKEN"); console.log("Subject (User ID):", profile.data.sub); console.log("Email:", profile.data.email); console.log("Email Verified:", profile.data.email_verified); console.log("Name:", profile.data.name); console.log("Picture:", profile.data.picture); console.log("Updated At:", profile.data.updated_at); ``` -------------------------------- ### Configure Phone Providers (Node.js) Source: https://github.com/auth0/node-auth0/blob/master/v5_MIGRATION_GUIDE.md This snippet demonstrates configuring phone providers for branding using the Auth0 Node.js SDK. It covers creating, listing, updating, deleting, and getting individual phone providers. These are used for features like MFA via SMS. ```javascript const auth0 = require('auth0').ManagementAPI({ domain: 'YOUR_DOMAIN', token: 'YOUR_API_TOKEN' }); async function managePhoneProviders() { try { // Create a phone provider (example) // const createPayload = { ... }; // Provide provider details // await auth0.branding.configurePhoneProvider(createPayload); // console.log('Phone provider configured.'); // Get all phone providers const providers = await auth0.branding.getAllPhoneProviders(); console.log('All Phone Providers:', providers); // Get a specific phone provider (replace 'providerId' with actual ID) // const provider = await auth0.branding.getPhoneProvider('providerId'); // console.log('Specific Phone Provider:', provider); // Update a phone provider (replace 'providerId' with actual ID) // const updatePayload = { ... }; // Provide updated details // await auth0.branding.updatePhoneProvider('providerId', updatePayload); // console.log('Phone provider updated.'); // Delete a phone provider (replace 'providerId' with actual ID) // await auth0.branding.deletePhoneProvider('providerId'); // console.log('Phone provider deleted.'); } catch (error) { console.error('Error managing phone providers:', error); } } // managePhoneProviders(); ``` -------------------------------- ### SetCustomSigningKeysRequestContent Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.SetCustomSigningKeysRequestContent.html Example structure for the SetCustomSigningKeysRequestContent interface. ```json { keys: [{ kty: "EC" }] } ``` -------------------------------- ### GET /prompts/partials Source: https://github.com/auth0/node-auth0/blob/master/docs/media/reference.md Get template partials for a prompt. ```APIDOC ## GET /prompts/partials ### Description Get template partials for a prompt. ### Parameters #### Path Parameters - **prompt** (Management.PartialGroupsEnum) - Required - Name of the prompt. ### Request Example await client.prompts.partials.get("login"); ``` -------------------------------- ### Example CreateBrandingThemeRequestContent Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.CreateBrandingThemeRequestContent.html This example demonstrates the structure of the CreateBrandingThemeRequestContent object, including detailed configurations for borders, colors, fonts, page background, and widget settings. Use this as a template when customizing your Auth0 branding. ```json { "borders": { "button_border_radius": 1.1, "button_border_weight": 1.1, "buttons_style": "pill", "input_border_radius": 1.1, "input_border_weight": 1.1, "inputs_style": "pill", "show_widget_shadow": true, "widget_border_weight": 1.1, "widget_corner_radius": 1.1 }, "colors": { "body_text": "body_text", "error": "error", "header": "header", "icons": "icons", "input_background": "input_background", "input_border": "input_border", "input_filled_text": "input_filled_text", "input_labels_placeholders": "input_labels_placeholders", "links_focused_components": "links_focused_components", "primary_button": "primary_button", "primary_button_label": "primary_button_label", "secondary_button_border": "secondary_button_border", "secondary_button_label": "secondary_button_label", "success": "success", "widget_background": "widget_background", "widget_border": "widget_border" }, "fonts": { "body_text": { "bold": true, "size": 1.1 }, "buttons_text": { "bold": true, "size": 1.1 }, "font_url": "font_url", "input_labels": { "bold": true, "size": 1.1 }, "links": { "bold": true, "size": 1.1 }, "links_style": "normal", "reference_text_size": 1.1, "subtitle": { "bold": true, "size": 1.1 }, "title": { "bold": true, "size": 1.1 } }, "page_background": { "background_color": "background_color", "background_image_url": "background_image_url", "page_layout": "center" }, "widget": { "header_text_alignment": "center", "logo_height": 1.1, "logo_position": "center", "logo_url": "logo_url", "social_buttons_layout": "bottom" } } ``` -------------------------------- ### SetRulesConfigRequestContent Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.SetRulesConfigRequestContent.html Basic usage example for the SetRulesConfigRequestContent interface. ```json { * value: "value" * } ``` -------------------------------- ### DirectoryProvisioningClient Constructor Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.DirectoryProvisioningClient.html Initializes a new instance of the DirectoryProvisioningClient. ```APIDOC ## Constructor DirectoryProvisioningClient ### Description Initializes a new instance of the DirectoryProvisioningClient. ### Parameters #### Path Parameters * **options** (BaseClientOptions) - Required - Options for the base client. ### Returns DirectoryProvisioningClient ``` -------------------------------- ### GetTenantSettingsRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.GetTenantSettingsRequestParameters.html Example of how to define GetTenantSettingsRequestParameters with fields and include_fields. ```typescript { fields: "fields", include_fields: true } ``` -------------------------------- ### ListClientsRequestParameters Example Object Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListClientsRequestParameters.html A sample object demonstrating the structure of parameters used for listing clients. ```typescript { fields: "fields", include_fields: true, page: 1, per_page: 1, include_totals: true, is_global: true, is_first_party: true, app_type: "app_type", external_client_id: "external_client_id", q: "q" } ``` -------------------------------- ### GetOrganizationInvitationRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.GetOrganizationInvitationRequestParameters.html Example of how to define GetOrganizationInvitationRequestParameters with fields and include_fields. ```typescript { fields: "fields", include_fields: true } ``` ```typescript interface GetOrganizationInvitationRequestParameters { [fields](#fields)?: string | null; [include_fields](#include_fields)?: boolean | null; } ``` -------------------------------- ### RenderingClient.list() Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.RenderingClient.html Retrieves render setting configurations for all screens. ```APIDOC ## GET /api/v2/prompts/rendering ### Description Get render setting configurations for all screens. ### Method GET ### Endpoint /api/v2/prompts/rendering ### Parameters #### Path Parameters None #### Query Parameters - **fields** (string) - Optional - Specifies the fields to include in the response. - **include_fields** (boolean) - Optional - Whether to include the specified fields. - **page** (number) - Optional - The page number for pagination. - **per_page** (number) - Optional - The number of items per page. - **include_totals** (boolean) - Optional - Whether to include total counts in the response. - **prompt** (string) - Optional - Filters by prompt name. - **screen** (string) - Optional - Filters by screen name. - **rendering_mode** (string) - Optional - Filters by rendering mode (e.g., 'advanced'). #### Request Body None ### Request Example ```javascript await client.prompts.rendering.list({ fields: "fields", include_fields: true, page: 1, per_page: 1, include_totals: true, prompt: "prompt", screen: "screen", rendering_mode: "advanced" }) ``` ### Response #### Success Response (200) - **Page** (object) - An object containing a page of render setting configurations. - **content** (array) - An array of [ListAculsResponseContentItem](../interfaces/management.Management.ListAculsResponseContentItem.html). - **start** (number) - The starting index of the current page. - **limit** (number) - The maximum number of items per page. - **total_results** (number) - The total number of results. #### Response Example ```json { "content": [ { "id": "render_setting_id", "screen": "screen_name", "prompt": "prompt_name", "rendering_mode": "advanced", "created_at": "2023-01-01T12:00:00Z", "updated_at": "2023-01-01T12:00:00Z" } ], "start": 0, "limit": 1, "total_results": 1 } ``` #### Error Responses - **Management.BadRequestError** - **Management.UnauthorizedError** - **Management.PaymentRequiredError** - **Management.ForbiddenError** - **Management.TooManyRequestsError** ``` -------------------------------- ### GetActionModuleActionsRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.GetActionModuleActionsRequestParameters.html An example of how to structure the GetActionModuleActionsRequestParameters object for pagination. ```json { page: 1, per_page: 1 } ``` -------------------------------- ### DeleteUserGrantByUserIdRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.DeleteUserGrantByUserIdRequestParameters.html Example object structure for the DeleteUserGrantByUserIdRequestParameters interface. ```json { * user_id: "user_id" * } ``` -------------------------------- ### Create a new client Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.ClientsClient.html Basic usage of the create method to initialize a new client with a specified name. ```javascript await client.clients.create({ name: "name" }) ``` -------------------------------- ### ClearAssessorsRequestContent Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ClearAssessorsRequestContent.html Example object structure for the ClearAssessorsRequestContent interface. ```json { connection: "connection", assessors: ["new-device"] } ``` -------------------------------- ### BrandingClient Constructor Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.BrandingClient.html Initializes a new instance of the BrandingClient. ```APIDOC ## new BrandingClient(options) ### Description Initializes a new instance of the BrandingClient. ### Parameters #### Path Parameters * **options** (BaseClientOptions) - Required - Options for the base client. ### Returns BrandingClient ``` -------------------------------- ### ListOrganizationDiscoveryDomainsRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListOrganizationDiscoveryDomainsRequestParameters.html Example of how to define ListOrganizationDiscoveryDomainsRequestParameters with 'from' and 'take' properties. ```typescript { from: "from", take: 1 } ``` -------------------------------- ### KeysClient Constructor Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.KeysClient-1.html Initializes a new instance of the KeysClient class using the provided configuration options. ```APIDOC ## constructor ### Description Initializes a new instance of the KeysClient class. ### Parameters - **options** (BaseClientOptions) - Required - Configuration options for the client. ### Request Example const keysClient = new KeysClient({ domain: 'your-domain.auth0.com', clientId: '...', clientSecret: '...' }); ``` -------------------------------- ### GetRuleRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.GetRuleRequestParameters.html Example of how to define GetRuleRequestParameters to specify fields for retrieval. ```typescript { fields: "fields", include_fields: true } ``` -------------------------------- ### TenantsClient Constructor Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.TenantsClient.html Initializes a new instance of the TenantsClient class. ```APIDOC ## new TenantsClient(options: BaseClientOptions) ### Description Initializes a new instance of the TenantsClient class. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### Management Client Initialization Source: https://github.com/auth0/node-auth0/blob/master/docs/hierarchy.html Options for initializing the ManagementClient. ```APIDOC ## Management Client Initialization ### Description Configuration options for initializing the ManagementClient, allowing authentication via token, client secret, or client assertion. ### Parameters #### ManagementClientOptions - **domain** (string) - Required - The Auth0 domain for your tenant. - **clientId** (string) - Required - The Client ID of your Auth0 application. #### ManagementClientOptionsWithToken - **token** (string) - Required - An access token for authenticating API requests. #### ManagementClientOptionsWithClientSecret - **clientSecret** (string) - Required - The client secret for your Auth0 application. #### ManagementClientOptionsWithClientAssertion - **clientAssertion** (string) - Required - A JWT assertion for client authentication. ### Usage Example ```typescript import { ManagementClient } from 'auth0'; // Using token const managementClientWithToken = new ManagementClient({ domain: 'YOUR_DOMAIN', clientId: 'YOUR_CLIENT_ID', token: 'YOUR_ACCESS_TOKEN' }); // Using client secret const managementClientWithSecret = new ManagementClient({ domain: 'YOUR_DOMAIN', clientId: 'YOUR_CLIENT_ID', clientSecret: 'YOUR_CLIENT_SECRET' }); ``` ``` -------------------------------- ### RollbackActionModuleRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.RollbackActionModuleRequestParameters.html Basic usage example showing the required module_version_id property. ```json { module_version_id: "module_version_id" } ``` -------------------------------- ### SetGuardianFactorRequestContent Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.SetGuardianFactorRequestContent.html An example of how to structure the SetGuardianFactorRequestContent object to enable a guardian factor. ```json { enabled: true } ``` -------------------------------- ### Initialize and use Legacy Management Client Source: https://github.com/auth0/node-auth0/blob/master/docs/index.html Uses the legacy ManagementClient for user operations. Requires domain, clientId, clientSecret, and scope configuration. ```javascript import { ManagementClient } from "auth0/legacy";const management = new ManagementClient({ domain: "{YOUR_TENANT_AND REGION}.auth0.com", clientId: "{YOUR_CLIENT_ID}", clientSecret: "{YOUR_CLIENT_SECRET}", scope: "read:users update:users",});// Legacy API methods use promise-based patterns (node-auth0 v4.x style)management.users .getAll() .then((users) => console.log(users)) .catch((err) => console.error(err));// Or with async/awaittry { const users = await management.users.getAll(); console.log(users);} catch (err) { console.error(err);} ``` -------------------------------- ### Compare v4 and v5 Management Client Migration Source: https://github.com/auth0/node-auth0/blob/master/docs/index.html Demonstrates the syntax changes between the legacy v4 SDK and the current v5 SDK for listing users. ```javascript const { ManagementClient } = require("auth0/legacy");const management = new ManagementClient({ domain: "your-tenant.auth0.com", clientId: "YOUR_CLIENT_ID", clientSecret: "YOUR_CLIENT_SECRET", scope: "read:users",});// With promisesmanagement.users .getAll({ search_engine: "v3" }) .then((users) => { console.log(users); }) .catch((err) => { console.error(err); });// Or with async/awaittry { const users = await management.users.getAll({ search_engine: "v3" }); console.log(users);} catch (err) { console.error(err);} ``` ```javascript import { ManagementClient } from "auth0";const management = new ManagementClient({ domain: "your-tenant.auth0.com", clientId: "YOUR_CLIENT_ID", clientSecret: "YOUR_CLIENT_SECRET",});// With promisesmanagement.users .list({ searchEngine: "v3", }) .then((users) => { console.log(users); }) .catch((error) => { console.error(error); });// Or with async/awaittry { const users = await management.users.list({ searchEngine: "v3", }); console.log(users);} catch (error) { console.error(error);} ``` -------------------------------- ### ListFlowsRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListFlowsRequestParameters.html An example of how to structure the ListFlowsRequestParameters object to specify pagination and other options. ```json { page: 1, per_page: 1, include_totals: true, synchronous: true } ``` -------------------------------- ### ListAculsRequestParameters Example Object Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListAculsRequestParameters.html An example object demonstrating the structure of the ListAculsRequestParameters interface. ```typescript { * fields: "fields", * include_fields: true, * page: 1, * per_page: 1, * include_totals: true, * prompt: "prompt", * screen: "screen", * rendering_mode: "advanced" * } ``` -------------------------------- ### List directory provisioning configurations Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.DirectoryProvisioningClient.html Retrieves a list of directory provisioning configurations for a tenant using optional pagination parameters. ```javascript await client.connections.directoryProvisioning.list({ from: "from", take: 1 }) ``` -------------------------------- ### Create Directory Provisioning Configuration Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.DirectoryProvisioningClient.html Use this method to initialize a new directory provisioning configuration for a connection. ```typescript await client.connections.directoryProvisioning.create("id") ``` -------------------------------- ### GetGroupMembersRequestParameters Usage Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.GetGroupMembersRequestParameters.html An example object demonstrating the structure of the request parameters. ```json { fields: "fields", include_fields: true, from: "from", take: 1 } ``` -------------------------------- ### CreateClientGrantRequestContent Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.CreateClientGrantRequestContent.html An example of the CreateClientGrantRequestContent interface, specifying an audience for a client grant. ```typescript { audience: "audience" } ``` -------------------------------- ### ListOrganizationsRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListOrganizationsRequestParameters.html A basic object structure demonstrating the usage of pagination and sorting parameters. ```json { * from: "from", * take: 1, * sort: "sort" * } ``` -------------------------------- ### GET /riskAssessments/settings/newDevice Source: https://github.com/auth0/node-auth0/blob/master/docs/media/reference.md Gets the risk assessment settings for the new device assessor. ```APIDOC ## GET /riskAssessments/settings/newDevice ### Description Gets the risk assessment settings for the new device assessor. ### Request Example await client.riskAssessments.settings.newDevice.get(); ``` -------------------------------- ### DirectoryProvisioningClient.list Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.DirectoryProvisioningClient.html Retrieves a list of directory provisioning configurations for a tenant. ```APIDOC ## GET /api/v2/connections/enterprise/{id}/directory-provisioning ### Description Retrieve a list of directory provisioning configurations of a tenant. ### Method GET ### Endpoint /api/v2/connections/enterprise/{id}/directory-provisioning ### Parameters #### Query Parameters * **request** (ListDirectoryProvisioningsRequestParameters) - Optional - Parameters for listing directory provisionings. * **requestOptions** (DirectoryProvisioningClient.RequestOptions) - Optional - Request-specific configuration. ### Returns Promise> ### Throws * Management.BadRequestError * Management.UnauthorizedError * Management.ForbiddenError * Management.TooManyRequestsError ### Example ```javascript await client.connections.directoryProvisioning.list({ from: "from", take: 1 }) ``` ``` -------------------------------- ### Install Auth0 SDK Source: https://github.com/auth0/node-auth0/blob/master/docs/index.html Command to install the Auth0 SDK via npm. ```bash npm install auth0 ``` -------------------------------- ### UserInfoClient Constructor Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/userinfo.UserInfoClient.html Initializes a new UserInfo API client with the specified domain and client options. ```APIDOC ## UserInfoClient Constructor ### Description Create a new UserInfo API client. ### Method `new UserInfoClient(options: { domain: string } & ClientOptions)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```javascript import { UserInfoClient } from 'auth0'; const userInfoClient = new UserInfoClient({ domain: 'your-tenant.auth0.com' }); ``` ### Response #### Success Response (200) None (constructor does not return a value, it initializes an object) #### Response Example None ``` -------------------------------- ### BrandingPageBackground Gradient Example Source: https://github.com/auth0/node-auth0/blob/master/docs/types/management.Management.BrandingPageBackground.html Example object structure for defining a linear gradient background. ```javascript { type: 'linear-gradient', start: '#FFFFFF', end: '#000000', angle_deg: 35 } ``` -------------------------------- ### GET /connections/directory-provisioning Source: https://github.com/auth0/node-auth0/blob/master/reference.md Retrieves a list of directory provisioning configurations for a tenant. ```APIDOC ## GET /connections/directory-provisioning ### Description Retrieve a list of directory provisioning configurations of a tenant. ### Method GET ### Endpoint /connections/directory-provisioning ``` -------------------------------- ### PostClientCredentialRequestContent Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.PostClientCredentialRequestContent.html An example of the PostClientCredentialRequestContent interface, specifying a public key credential type. ```json { "credential_type": "public_key" } ``` -------------------------------- ### BotDetectionClient Constructor Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.BotDetectionClient.html Initializes a new instance of the BotDetectionClient. ```APIDOC ## BotDetectionClient Constructor ### Description Initializes a new instance of the BotDetectionClient. ### Method `new BotDetectionClient(options: BaseClientOptions): BotDetectionClient` ### Parameters #### Path Parameters - **options** (BaseClientOptions) - Required - Options for the client. ### Returns - **BotDetectionClient** - An instance of BotDetectionClient. ``` -------------------------------- ### Initialize Management API Client Source: https://github.com/auth0/node-auth0/blob/master/docs/index.html Configure the ManagementClient using either a direct token or client credentials. ```javascript import { ManagementClient } from "auth0";const management = new ManagementClient({ domain: "{YOUR_TENANT_AND REGION}.auth0.com", token: "{YOUR_API_V2_TOKEN}",}); ``` ```javascript import { ManagementClient } from "auth0";const management = new ManagementClient({ domain: "{YOUR_TENANT_AND REGION}.auth0.com", clientId: "{YOUR_CLIENT_ID}", clientSecret: "{YOUR_CLIENT_SECRET}", withCustomDomainHeader: "auth.example.com", // Optional: Auto-applies to whitelisted endpoints}); ``` -------------------------------- ### RegisterCimdClientRequestContent Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.RegisterCimdClientRequestContent.html This is an example of the RegisterCimdClientRequestContent interface structure. It requires an external client ID. ```json { "external_client_id": "external_client_id" } ``` -------------------------------- ### SsoTicketClient - Constructor Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.SsoTicketClient.html Initializes a new instance of the SsoTicketClient. ```APIDOC ## new SsoTicketClient(options: BaseClientOptions): SsoTicketClient ### Description Initializes a new instance of the SsoTicketClient. ### Parameters #### Path Parameters - **options** (BaseClientOptions) - Required - Options for the base client. ``` -------------------------------- ### RenderingClient Constructor Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.RenderingClient.html Initializes a new instance of the RenderingClient class. ```APIDOC ## RenderingClient Constructor ### Description Initializes a new instance of the RenderingClient class. ### Method constructor ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```javascript new RenderingClient(options) ``` ### Response #### Success Response (200) - **RenderingClient** (object) - An instance of the RenderingClient. ### Response Example ```json { "instance": "RenderingClient" } ``` ``` -------------------------------- ### ListRulesRequestParameters Example Object Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListRulesRequestParameters.html A sample object demonstrating the structure of parameters used for listing rules. ```json { page: 1, per_page: 1, include_totals: true, enabled: true, fields: "fields", include_fields: true } ``` -------------------------------- ### ListConnectionProfileRequestParameters Interface Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListConnectionProfileRequestParameters.html Example of how to define ListConnectionProfileRequestParameters with 'from' and 'take' properties for pagination. ```typescript { from: "from", take: 1 } ``` ```typescript interface ListConnectionProfileRequestParameters { [from](#from)?: string | null; [take](#take)?: number | null; } ``` -------------------------------- ### Constructor - VerificationClient Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.VerificationClient.html Initializes a new instance of the VerificationClient. ```APIDOC ## constructor ### Description Creates a new instance of the VerificationClient. ### Parameters - **options** (BaseClientOptions) - Required - Configuration options for the client. ### Returns - **VerificationClient** - A new instance of the client. ``` -------------------------------- ### Example CreateFormRequestContent Object Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.CreateFormRequestContent.html An example of how to structure a CreateFormRequestContent object, specifying the 'name' property. ```javascript { * name: "name" * } ``` -------------------------------- ### Initialize ManagementClient with existing token Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.ManagementClient.html Use a static token or a token-retrieval function for authentication. ```javascript const client = new ManagementClient({ domain: 'your-tenant.auth0.com', token: 'your-static-token' // or () => getAccessToken()}); ``` -------------------------------- ### Initialize ManagementClient with client assertion Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.ManagementClient.html Use client credentials with a client assertion signing key for authentication. ```javascript const client = new ManagementClient({ domain: 'your-tenant.auth0.com', clientId: 'your-client-id', clientAssertionSigningKey: 'your-private-key'}); ``` -------------------------------- ### UpdateSupplementalSignalsRequestContent Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.UpdateSupplementalSignalsRequestContent.html This example shows how to structure the UpdateSupplementalSignalsRequestContent object to enable Akamai header processing. ```json { * akamai_enabled: true * } ``` -------------------------------- ### Instantiate VersionsClient Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.SDK.VersionsClient-1.html Create a new instance of the VersionsClient. Requires BaseClientOptions for configuration. ```typescript new VersionsClient(options: BaseClientOptions) ``` -------------------------------- ### Example Scope String Source: https://github.com/auth0/node-auth0/blob/master/docs/types/auth.SDK.CustomTokenExchangeOptions.html Shows a space-separated string of OAuth 2.0 scopes being requested, subject to API authorization policies in Auth0. ```string "openid profile email read:data write:data" ``` -------------------------------- ### ListSynchronizedGroupsRequestParameters Example Source: https://github.com/auth0/node-auth0/blob/master/docs/interfaces/management.Management.ListSynchronizedGroupsRequestParameters.html Example demonstrating the structure of ListSynchronizedGroupsRequestParameters, used for specifying 'from' and 'take' options. ```json { from: "from", take: 1 } ``` -------------------------------- ### Initialize ManagementClient with custom fetcher and domain header Source: https://github.com/auth0/node-auth0/blob/master/docs/classes/management.ManagementClient.html Combine a custom fetcher implementation with a custom domain header for advanced request handling. ```javascript const client = new ManagementClient({ domain: 'your-tenant.auth0.com', clientId: 'your-client-id', clientSecret: 'your-client-secret', withCustomDomainHeader: 'auth.example.com', // Custom domain header logic fetcher: async (args) => { console.log('Making request:', args.url); // Custom logging return fetch(args.url, { ...args }); // Custom fetch implementation }}); ```