Skip to content

Getting Started ​

This chapter will help you quickly start group tool development.

Development Preparation ​

Apply for Developer Application ​

Before development, you need to apply for a developer application from the official platform. The following information is required:

  • Application Name: Typically composed of simple English terms, such as "card", "ota", etc.
  • Application Description: A brief description of the group tool.
  • Application Keywords: Used for quick searching, supporting multiple languages.

After successful application, you will get:

  • app_key: Application identifier
  • app_secret: Application secret (should be securely stored to prevent leakage)

Development Process ​

  1. Group tool developers work on both frontend and backend projects separately (we provide basic utility libraries for both frontend and backend development, which will be introduced later).
  2. Developers then use the Mini-App debugger for testing.
  3. After debugging is complete, the program can be published and launched.

A group tool opens inside a group chat. After launch, call mos.getLaunchOptions() and read query.conversationId. Later Open APIs use this group ID. See Backend Development.

Project Configuration ​

Integrating the mos.js File in Group Tool Projects ​

To invoke MOS interfaces, include the following MOS file in your target pages:

html
<script src="https://cdn-oss.mos.me/public/js/mos-1.1.12.js"></script>

SDK Download

Click to download the latest version of SDK: mos.js

Tip

Strong Recommendation: Download the JS File Locally

Vue/React Project Configuration ​

If you are using it in a Vue or React single-page application, you need to import it in the root file index.html:

html
<script src="https://cdn-oss.mos.me/public/js/mos-1.1.12.js"></script>

Note

If eslint validation is enabled in the project that variables must be declared before use, you can access the mos object through window.mos.

Next Steps ​