Common Interface documentation. Overview The Common Interface allows developers to directly interact with the server through HTTP requests. This allows developers to upload and obtain media files and other functions to obtain images, audios, and videos.
The common interface is to use HTTP requests to allow developers to directly interact with the server and implement functions such as uploading and obtaining media files to obtain images, audios, videos, and other media files.
The access_token required to call an interface must be obtained through the interface for obtaining creden.
Obtain the credential
Interface Description
Before using a common interface, you need to do the following two steps:
1. have a public account and get the appid and appsecret (apply for the custom menu function on the public platform, enable the developer mode, and enter the URL and Token to get it)
2. access access_token through the credential acquisition interface
Note:
Access_token is the ticket for a third party to access api resources. access_token corresponds to the public account, which is globally unique. repeated acquisition will invalidate the last access_token obtained.
Request description
Http request method: GEThttps: // api.weixin.qq.com/cgi-bin/token? Grant_type = client_credential & appid = APPID & secret = APPSECRET
Parameter description
| Parameters |
Required? |
Description |
| Grant_type |
Yes |
Obtain access_token and enter client_credential |
| Appid |
Yes |
Unique third-party user credential |
| Secret |
Yes |
The unique credential key of a third-party user, which is appsecret |
Return description
Correct Json return results:
{"access_token":"ACCESS_TOKEN","expires_in":7200}
| Parameters |
Description |
| Access_token |
Obtained credential |
| Expires_in |
Valid credential time, in seconds |
Example of returned error Json:
{"errcode":40013,"errmsg":"invalid appid"}
The universal interfaces of the middleware are HTTP requests that allow developers to directly interact with the server and implement functions such as media file uploading and obtaining media files to obtain images, audios, and videos...