tencent cloud

Tencent Cloud Super App as a Service

Release Notes and Announcements
Announcement: Tencent Cloud Mini Program Platform Renamed to Tencent Cloud Super App as a Service on January 2, 2025
Console Updates
Android SDK Updates
iOS SDK Updates
Flutter SDK Updates
IDE Updates
Base Library Updates
Product Introduction
Overview
Strengths
Use Cases
Purchase Guide
Billing Overview
Pay-As-You-Go Billing
Renewal Guide
Service Suspension Instructions
Getting Started
Plan Management
Overview
Console Account Management
Storage Configuration
Acceleration Configuration
Branding Configurations
Platform Features
Console Login
Users and Permission System
Mini Program Management
Mini Game Management
Superapp Management
Commercialization
Platform Management
User Management
Team Management
Operations Management
Security Center
Code Integration Guide
Getting Demo and SDK
Android
iOS
Flutter
Superapp Server
GUID Generation Rules
Mini Program Development Guide
Mini Program Introduction and Development Environment
Mini Program Code Composition
Guide
Framework
Components
API
Server Backend
JS SDK
Base Library
IDE Operation Instructions
Mini Game Development Guide
Guide
API
Server Backend
Practice Tutorial
Mini Program Login Practical Tutorial
Mini Program Subscription Message Practical Tutorial
Payment Practical Tutorial
Ad Integration Practical Tutorial
Mini Game Subscription Message Practical Tutorial
API Documentation
History
Introduction
API Category
Making API Requests
Operation Management APIs
User Management APIs
Team Management APIs
Sensitive API-Related APIs
Role Management APIs
Platform Management APIs
Other Console APIs
Mini Program or Mini Game APIs
Management-Sensitive APIs
Global Domain Management APIs
Superapp APIs
Data Types
Agreements
Service Level Agreement
Data Processing and Security Agreement
SDK Privacy Policy Module
SDK Data Processing and Security Agreement Module

Navigation

PDF
Focus Mode
Font Size
Last updated: 2025-04-10 18:18:33

exitMiniProgram

This API is called using wx.exitMiniProgram(Object object).
Note:
This API is supported in mini programs but not in mini games.
Feature description:Exits the current mini program. This API can only be successfully called as a result of a user tap action.
Parameter and description:Object object.
Property
Type
Default value
‍Required
Description
success
function
-
False
Callback function for successful API calls.
fail
function
-
False
Callback function for failed API calls.
complete
function
-
False
Callback function executed after API call ends (regardless of success or failure).

navigateToMiniProgram

This API is called using wx.navigateToMiniProgram(Object object).
Note:
This API is supported in mini programs but not in mini games.
Feature description:Opens another mini program.
Parameter and description:Object object.
Property
Type
Default value
‍Required
Description
appId
string
-
True
The appId of the mini program to open.
path
string
-
False
The page path to open. If empty, the home page is opened. The string after the ? in the path will become a query, and the query data can be obtained in the mini program’s callback functions App.onLaunch, App.onShow and Page.onLoad, or in wx.getLaunchOptionsSync.
extraData
object
-
False
Data to pass to the target mini program. It can be obtained in App.onLaunch and App.onShow .
envVersion
string
release
False
The version of the mini program to open. This parameter is valid only when the current mini program is in development version or Preview. If the current mini program is the released version, the mini program that is opened must be the released version. Valid values:
develop: The development version
trial: The Preview
release: The released version
success
function
-
False
Callback function for successful API calls.
fail
function
-
False
Callback function for failed API calls.
complete
function
-
False
Callback function executed after API call ends (regardless of success or failure).

Usage restrictions

User trigger required

If the user does not tap anywhere on the mini program page, the developer will not be able to call this API to automatically navigate to another mini program.

User confirmation required

Before navigating to another mini program, a pop-up window will appear asking for user confirmation, and the navigation will proceed after the user confirms that. If the user tapsCancel, it will trigger a callback with fail cancel.

Each mini program can jump to no more than 10 other mini programs

When submitting a new version of mini program code, developers must include a list of up to 10 target mini programs in the code configuration if using the navigation feature. Otherwise, the code will not be approved. The list can be updated with each new version but cannot be dynamically modified. For more information about the configuring method, see Global Configuration. The appId must be in the configuration list, otherwise the fail callback will be triggered with fail appId "${appId}" is not in navigateToMiniProgramAppIdList.
Example:
wx.navigateToMiniProgram({
appId: '',
path: 'page/index/index?id=123',
extraData: {
foo: 'bar'
},
envVersion: 'develop',
success(res) {
// Navigation to mini program successful
}
})

navigateBackMiniProgram

This API is called using wx.navigateBackMiniProgram(Object object).
Note:
This API is supported in mini programs but not in mini games.
Feature description:Returns to the previous mini program. This API can be called successfully only when the current mini program is opened by another mini program.
Parameter and description:Object object.
Property
Type
Default value
‍Required
Description
extraData
Object
{}
False
Data to return to the previous mini program. The previous mini program can access this data in App.onShow.
success
function
-
False
Callback function for successful API calls.
fail
function
-
False
Callback function for failed API calls.
complete
function
-
False
Callback function executed after API call ends (regardless of success or failure).
Example:
wx.navigateBackMiniProgram({
extraData: {
foo: 'bar'
},
success(res) {
// Returned to previous mini program successfully
}
})



Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback