Where can I find the legal domain name for configuration requests in the WeChat mini program?

php是最好的语言
Release: 2018-07-25 13:41:33
Original
22557 people have browsed it

WeChat Mini Program - To configure the legal domain name request and the frequently encountered Douban api request 403 problem, you must first enter the homepage of the official website of the WeChat public platform, then click Settings in the lower right corner, and then look at the AppID and server in the development settings domain name for subsequent operations.

1. Configuring the legal domain name of the request

Where to find the legal domain name of the configuration request?

1 .Enter the homepage of the official WeChat public platform (mp.weixin.qq.com)
WeChat public platform|mini program homepage

Where can I find the legal domain name for configuration requests in the WeChat mini program?

2. Settings in the lower right corner
Where can I find the legal domain name for configuration requests in the WeChat mini program?

3. Development settings
There are AppID and server domain name
Where can I find the legal domain name for configuration requests in the WeChat mini program?

Where can I find the legal domain name for configuration requests in the WeChat mini program?

2. Douban api problem

Always encounter Douban api request 403 problem
https://api.douban.com
( https://api.douban.com/v2/mov...
Unsuccessful use
The solution for netizens isReplace the original Douban api with the following URL
https: //douban.uieee.com and http://t.yushu.im/v2/movie/to...
Where can I find the legal domain name for configuration requests in the WeChat mini program?

For example, the interface of the top 250 Douban movies:
(https ://douban.uieee.com/v2/m...
(http://t.yushu.im/v2/movie/to... These domain names do not have security verification and are not https. Therefore, in the mini program It cannot be added to the legal domain name. So I only used the first https://douban.uieee.com.

Where can I find the legal domain name for configuration requests in the WeChat mini program?

Where can I find the legal domain name for configuration requests in the WeChat mini program?

Solution to the problem of unsuccessful interface api request:

The error is as shown in the figure:
Where can I find the legal domain name for configuration requests in the WeChat mini program?

Solution:
Modify the header in wx.request
//We need to modify the header in the request:
header:{

      // "Content-Type":"application/json"
       //这里修改json为text  ,因为原来json请求会返回400(bad request)
      **"Content-Type": "application/text"**
     },
Copy after login

Where can I find the legal domain name for configuration requests in the WeChat mini program?

#Rendering after successful solution:
Where can I find the legal domain name for configuration requests in the WeChat mini program?

Related recommendations:

WeChat Mini Program Development Practical Tutorial Development and Running WeChat Mini Program

How to develop WeChat Mini Program WeChat Mini Program development high-definition graphic tutorial

The above is the detailed content of Where can I find the legal domain name for configuration requests in the WeChat mini program?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!