Create an application in the console and get the HarmonyOS NEXT config file

更新时间:
复制 MD 格式

To use mPaaS, you must first create an application in the mPaaS console and download the configuration file.

Prerequisites

You must have a developer account. For more information, see Account registration (PC) or .

Create an mPaaS application

  1. Log on to the mPaaS console.

    Note

    If you use mPaaS on other platforms, such as the Ant Open Platform, log on to the mPaaS console for that platform.

  2. Click the Create Application button.

  3. Enter the application information.

    1. Enter an application name. For example, mPaaS Demo.

    2. Click the + icon to upload an application icon. This step is optional. If you skip it, the application uses the default icon.

  4. Click the Create button to create the application. The application list appears and displays the application that you just created.

Download the configuration file

  1. On the application list page, click the application name. The following page appears:

    • The application name is displayed in the upper-left corner. You can switch applications from here.

    • The navigation pane on the left displays a list of component services that mPaaS provides.

  2. Click Download HarmonyOS Code Configuration to navigate to the Code Configuration page.

  3. On the Code Configuration page, click Download Configuration. This downloads the application configuration file in .config format to your local computer. You will need this file for subsequent development.

    The file is in JSON format. The following code is an example:

    {
    	"absBase64Code":"",
    	"appId":"570DA89281533",
    	"appKey":"570DA89281533_HARMONY",
    	"base64Code":"",
    	"packageName":"com.mpaas.demo",
    	"rootPath":"mpaas/harmony/570DA89281533-shaojian",
    	"v6Base64Code":"",
    	"workspaceId":"shaojian",
    	"syncport":"443",
    	"syncserver":"msync.mpaas.cn-hangzhou.aliyuncs.com",
    	"pushPort":"443",
    	"pushGW":"push.mpaas.cn-hangzhou.aliyuncs.com",
    	"rpcGW":"https://mgw.mpaas.cn-hangzhou.aliyuncs.com/mgw.htm",
    	"logGW":"https://mdap.mpaas.cn-hangzhou.aliyuncs.com",
    	"mpaasapi":"https://mpaasapi.mpaas.cn-hangzhou.aliyuncs.com/mgw.htm",
    	"mrtcserver":"wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws",
    	"mdc":"https://mdc.mpaas.cn-hangzhou.aliyuncs.com",
    	"mpaasConfigVersion":"V_1.0",
    	"mpaasConfigEnv":"ONEX_CLOUD",
    	"mpaasConfigPluginExpired":"",
    	"mpaasConfigLicense":"rycSP0m9EH7shIngOpuN4xI17G07vpOrpNF+1Lve5xQxBgubiDxHPbon0v5Qr7STXHrhfOSA893sTbkdINxS7mzbAZF/QeqNyuyUR72Hx1ylKep0Pw4cROX3FXyhximn9kziQCT+f/NfUKQw2aI3IWNnnZ2+l/GVGGBwPG1YHywfyVEWRGx/uRc8RTzAq7VLEhduyktgNoLK1DhQiWbQKREeeITz8PvpnrzLGWPS+mM9yrmv1/YCmOA15OdCSr9Zo9EmKM52yo4hxvD4dS0GfiuTwLjLBGCiI3lkGIGuOOUnumMGKfpqSRjav4lLAzmqsGS7yzwo7gvyAf2PaSSmqw=="
    }