Skip to main content
Use this API to obtain the Mini Program App ID synchronously without requiring callbacks or promises.

Return Value

The returned App ID depends on the deployment context:
  • Deployed to AlipayCN: Returns the ID assigned by AlipayCN
  • Other deployments: Returns the ID assigned by Mini Program Platform

Code Example

Use Cases

Conditional Logic Based on App ID

Logging and Analytics

Notes

  • This is a synchronous operation that returns immediately
  • The App ID is stable and does not change during the Mini Program lifecycle
  • For AlipayCN deployments, cross-reference with the Mini Program Platform to find the official Mini Program ID

my.getRunScene

Get the running environment

my.SDKVersion

Get SDK version