Skip to main content
Version: Next

Taro.getExtConfig(option)

Gets the data field customized by the third-party platform.

Tips

  • The compatibility of this API cannot be determined via Taro.canIUse currently. You need to figure out yourself whether Taro.getExtConfig exists and is compatible with the API.

Reference

Type

(option?: Option) => Promise<SuccessCallbackResult>

Parameters

Option

PropertyTypeRequiredDescription
complete(res: any) => voidNoThe callback function used when the API call completed (always executed whether the call succeeds or fails)
fail(res: any) => voidNoThe callback function for a failed API call
success(res: Result) => voidNoThe callback function for a successful API call

SuccessCallbackResult

PropertyTypeDescription
extConfigRecord<string, any>Data customized by the third-party platform
errMsgstringCall result

Sample Code

if(Taro.getExtConfig) {
Taro.getExtConfig({
success: function (res) {
console.log(res.extConfig)
}
})
}

API Support

APIWeChat Mini-ProgramH5React Native
Taro.getExtConfig✔️