1e41f4b71Sopenharmony_ci# Certificate Management Dialog Box Development
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci> **NOTE**
4e41f4b71Sopenharmony_ci>
5e41f4b71Sopenharmony_ci> This guide applies to the SDK of API version 13 or later.
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ciYou can use the **certificateManagerDialog** APIs to open the certificate management dialog box and perform certificate management, such as installing, storing, using, and destroying a certificate.
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci## Available APIs
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ciFor details about the APIs, see [Certificate Management Dialog Box](../../reference/apis-device-certificate-kit/js-apis-certManagerDialog.md).
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ciThe following table describes the commonly used APIs.
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci| Instance         | API                                                      | Description                                        |
17e41f4b71Sopenharmony_ci| --------------- | ------------------------------------------------------------ | -------------------------------------------- |
18e41f4b71Sopenharmony_ci| certificateManagerDialog        | openCertificateManagerDialog(context: common.Context, pageType: CertificateDialogPageType): Promise\<void> | Opens the certificate management dialog box and displays the page of the specified type. This API uses a promise to return the result. |
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ci## How to Develop
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ci1. Apply for the ohos.permission.ACCESS_CERT_MANAGER permission. For details, see [Declaring Permissions](../AccessToken/declare-permissions.md).
23e41f4b71Sopenharmony_ci
24e41f4b71Sopenharmony_ci2. Import modules.
25e41f4b71Sopenharmony_ci
26e41f4b71Sopenharmony_ci   ```ts
27e41f4b71Sopenharmony_ci   import certificateManagerDialog from '@ohos.security.certManagerDialog';
28e41f4b71Sopenharmony_ci   import { BusinessError } from '@kit.BasicServicesKit';
29e41f4b71Sopenharmony_ci   import { common } from '@kit.AbilityKit';
30e41f4b71Sopenharmony_ci   ```
31e41f4b71Sopenharmony_ci3. Open the certificate management dialog box.
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ci   ```ts
34e41f4b71Sopenharmony_ci   async function certificateManagerDialogSample() {
35e41f4b71Sopenharmony_ci	/* context is application context information, which is obtained by the caller. The context here is only an example. */
36e41f4b71Sopenharmony_ci	let context: common.Context = getContext(this);
37e41f4b71Sopenharmony_ci	/* pageType specifies the type of the page to display. In this example, pageType is PAGE_MAIN, which indicates the main page of the Certificate Manager application. */
38e41f4b71Sopenharmony_ci	let pageType: certificateManagerDialog.CertificateDialogPageType = certificateManagerDialog.CertificateDialogPageType.PAGE_MAIN;
39e41f4b71Sopenharmony_ci	try {
40e41f4b71Sopenharmony_ci	  certificateManagerDialog.openCertificateManagerDialog(context, pageType).then(() => {
41e41f4b71Sopenharmony_ci		console.info('Succeeded in opening certificate manager dialog.');
42e41f4b71Sopenharmony_ci	  }).catch((err: BusinessError) => {
43e41f4b71Sopenharmony_ci		console.error(`Failed to open certificate manager dialog. Code: ${err.code}, message: ${err.message}`);
44e41f4b71Sopenharmony_ci	  })
45e41f4b71Sopenharmony_ci	} catch (error) {
46e41f4b71Sopenharmony_ci	  console.error(`Failed to open certificate manager dialog. Code: ${error.code}, message: ${error.message}`);
47e41f4b71Sopenharmony_ci	}
48e41f4b71Sopenharmony_ci   }
49e41f4b71Sopenharmony_ci   ```
50