# wx.authorizeForMiniProgram(Object object)

Start from base library version 2.14.4. Please remaining backward compatible.

with Promise style call: Not supported

Mini Program plugin: Support, need to Mini Program base library version no less than 2.14.4

This interface can only be called in a Mini Program plug-inUse the same as wx.authorizeCurrently only three types of support are available Scope (see below)

# parameter

# Object object

attribute type Default values Required Introductions
scope string yes Need to get permission Scope, see [scope list]((authorize#Scope - List))
success function no Interface calls the successful callback function
fail function no Interface calls failed callback functions
complete function no Interface calls the end of the callback function (call success or failure will be executed)

object.scope Legal value

value Introductions Minimum version

# sample code

  scope: 'scope.record',
  success () {
    // The user has agreed that the Mini Program will use the recording function, and then calls wx.startRecord Interface does not pop up to ask