Skip to main content

How to Invoke a Cloud Function

Cloud Development provides multiple SDKs for developers to invoke cloud functions, including Mini Program SDK, Web SDK, Node.js SDK, HTTP API, etc.

Invocation Example

For details, please refer to: Mini Program: Invoking Cloud functions

const res = await wx.cloud.callFunction({
name: name: 'functionName', // cloud function name
data: {
// parameters passed to the cloud function
param1: 'value1',
param2: 'value2'
}
});

💡 Note: When using different SDKs, ensure that the environment ID and relevant authentication information are properly configured.