# Backend API

Weixin Mini Program also provides a series of APIs that are invoked in the back-end server using HTTPS requests to help developers complete various digital analysis, management and query operations in the background.Such asgetAccessToken,code2Sessionetc.Please refer to the API documentation for details.

# access_token

access_tokenis Weixin Mini Program globally unique background interface invocation credential, which is used to invoke most background interfaces.Developers can access and store it via thegetAccessTokeninterface.

Foraccess_tokensecurity, backend APIs cannot be passed directly within Weixin Mini Program wx.request Calls - namelyapi.weixin.qq.comcannot be configured as a server domain.Developers should usegetAccessTokento getaccess_tokenon the backend server,And call the relevant API;

# Dxplaination of request parameters

  • For GET requests, the request parameters should be written in URL as QueryString.
  • For POST requests, some parameters need to be written in URL as QueryString (usually onlyaccess_token,Additional arguments, if any, are reflected in the URL in the document, and other arguments are written in the body of the POST request as a JSON character string unless otherwise specified.

# Return parameter explaination

Note: Some interfaces do not return errcode and errmsg when the API call succeeds, only if the call fails.