Backend API

View Markdown

Last edited on 2026-07-28

Mini Program also provides a series of APIs called via HTTPS requests on backend servers, helping developers perform various data analysis, management, and query operations in the backend. Examples include getAccessToken and code2Session. For detailed information, refer to the API Documentation.

access_token

access_token is the globally unique credential for backend API calls of a Mini Program. It is required for most backend interface calls. Developers can obtain it via the getAccessToken API and should store it securely.

To ensure the security of access_token, backend APIs must not be called directly via wx.request within a Mini Program . Specifically, api.weixin.qq.com must not be configured as a server domain. Developers should use getAccessToken on their backend server to obtain the access_token and then invoke the relevant APIs.

Request Parameter Description

  • For GET requests, request parameters must be included in the URL as a Query String.
  • For POST requests, some parameters must be included in the URL as a Query String (typically only access_token; any additional parameters will be specified in the URL within the documentation). All other parameters, unless otherwise specified, must be included in the body of the POST request in JSON string format.

Return Parameters Description

Note: When an API call is successful, some endpoints do not return errcode and errmsg. They are only returned when the call fails.