All Products
Document Center

Mini program version type

Last Updated: Feb 04, 2021


  • The basic library 1.10.0 and above versions support this interface. The lower versions need to complete compatibility process. For the operation, see Mini program basic library.
  • mPaaS 1.10.60 and above versions support this interface.

This interface is used to obtain the current running version of the Mini Program.


Parameter Type Required Description

success|Function| No |The callback function for a successful API|Function |No |The callback function for a failed API call.complete|Function |No |The callback function used when the API call is completed. This function is always executed no matter the call succeeds or fails.

Return value on success

Parameter Type Description
envVersion String The current running version of the Mini program. Enumerated types include: develop (development version), trial (experience version), release (release version).

Error code

Error code Description
3 Unknown error occurred.

Code sample

  1. my.getRunScene({
  2. success(result) {
  3. my.alert({
  4. title: 'Mini program version',
  5. content:`${result.envVersion}`
  6. });
  7. },
  8. })