First, you need to create a project in AppGallery Connect.

  1. Access AppGallery Connect and sign in with your account and password.
  2. Click My projects.
  3. Click Add project. In the dialog box that is displayed, enter the project name, and click OK.

To obtain a project-level credential of the Server SDK, you must have created a project in AppGallery Connect, enabled the required services for the project, and finished setting a data storage location. To download the authentication credential, perform the following steps:

  1. Sign in to AppGallery Connect and click My projects.
  2. Click your project from the project list.
  3. Go to Project settings > Server SDK.
  4. Click Create under API client.
  5. Click Download credential.

The Server SDK of AppGallery Connect is released in the NPM repository. Before integrating the SDK, you need to initialize the NPM project first.

If you do not have the package.json file, run the following command in the root directory of your project to create it:

npm init
Code copied