Home WeChat Applet Mini Program Development Developer mode of WeChat development

Developer mode of WeChat development

May 09, 2017 am 09:38 AM

1.0 Enable developer mode

①Fill in the server configuration

To enable the development mode, you need to become a developer first, and you can only choose one of the editing mode and the development mode (enter the WeChat public platform =>Development =>Basic configuration)You can see the following interface:

##Click to modify the configuration, the following interface will appear:

##Fill in the server address (URL), Token and EncodingAESKey, where the URL is the

interface URL used by developers to receive WeChat messages and events . The token can be filled in by the developer arbitrarily and used to generate a signature (the token will be compared with the token contained in the interface URL to verify the security). EncodingAESKey is manually filled in by the developer or randomly generated, and will be used as the message body encryption and decryption key.

At the same time, developers can choose the message encryption and decryption methods: plain text mode, compatibility mode and

security mode. The mode selection and server configuration will take effect immediately after submission. Developers are advised to fill in and select carefully. The default state of the encryption and decryption method is plaintext mode. Selecting compatibility mode and security mode requires configuring the relevant encryption and decryption codes in advance. For details, please refer to the document on message body signature and encryption and decryption (WeChat public account message encryption and decryption development documentation).

②Verify the validity of the server address

Development After the user submits the information, the WeChat server will send a GET request to the filled-in server address URL. The GET request carries four parameters.

Developers verify the request by checking the signature (the verification method is below). If it is confirmed that this GET request comes from the WeChat server, please return the echostr parameter content as it is, then the access will take effect and you will become a developer successfully, otherwise the access will fail (

Note: WeChat server only supports port 80).

Use GET request with the above parameters to request the server, the specific implementation code:

 1 public void InterfaceTest() 2 { 3   string token = "配置时填写的token"; 4  5   string echoString = HttpContext.Current.Request.QueryString["echoStr"]; 6   string signature = HttpContext.Current.Request.QueryString["signature"]; 7   string timestamp = HttpContext.Current.Request.QueryString["timestamp"]; 8   string nonce = HttpContext.Current.Request.QueryString["nonce"]; 9 10   if (!string.IsNullOrEmpty(echoString))11   {12     HttpContext.Current.Response.Write(echoString);13     HttpContext.Current.Response.End();14   }15 }
Copy after login
[Related recommendations]

1.

WeChat public account platform source code download

2.

Alizi order system source code free download

The above is the detailed content of Developer mode of WeChat development. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1268
29
C# Tutorial
1246
24
Tutorial on turning on developer options in Windows 11 Tutorial on turning on developer options in Windows 11 Jan 06, 2024 pm 08:16 PM

In win11, if we want to install and use the built-in Android emulator, we need to turn on the developer mode first. So how to turn on the developer mode in win11? In fact, we only need to find the developer option in the settings. How to turn on the developer mode in win11: 1. First, click the windows logo on the far left of the taskbar to open the start menu. 2. Then open the "Settings" option above. 3. After opening, go to the second to last "Privacy and Security" on the left column. 4. Then open the "Developer Options" in the upper right corner. 5. Finally, turn on the developer mode.

How to enable developer mode in Windows 11 How to enable developer mode in Windows 11 Apr 25, 2023 pm 10:58 PM

Microsoft has announced a new feature alongside Windows 10 called Developer Mode, which is also present in Windows 11. This is very important for all developers who code software development on Windows PC and want to deploy it to other devices. To improve the coding environment, users must enable developer mode on Windows systems, which allows users to benefit from enhanced assistance in writing, testing, and deploying code. Users must ensure that developer mode is enabled not only on the Windows machine where coding is done, but also on the device where it is deployed and tested. If you are new to coding and want to make the most of this feature, continue reading this article which will guide you how

How to turn on developer mode on Xiaomi Mi 14 Ultra? How to turn on developer mode on Xiaomi Mi 14 Ultra? Feb 23, 2024 am 10:16 AM

Xiaomi 14Ultra is a brand new model that many consumers prefer. It has achieved high sales since its official launch. Users who buy it will inevitably encounter some problems that they do not understand. Below, the editor will introduce Xiaomi 14Ultra to you. How to turn on developer mode? You can come and take a look together. How to enable developer mode on Xiaomi Mi 14 Ultra? 1. Open the phone settings and click on "My Device" 2. Scroll down to find "All Parameters and Information" 3. Click on the MIUI version quickly and continuously 4. When you see the system prompts, it means it has been turned on. 5. Let's go back to the settings and find "More Settings" 6. Find the developer options and open it. How to enable developer mode on Xiaomi Mi 14Ultra

Will developer mode leak privacy? Will developer mode leak privacy? Nov 03, 2022 pm 02:26 PM

The developer mode may leak privacy, because some virus software may steal your private data through the developer option mode; the developer mode is for developers to do advanced debugging of mobile devices. For general For users, it is not recommended to enable developer mode.

How to enable developer mode on iqooz9? How to enable developer mode on iqooz9? Mar 18, 2024 pm 05:34 PM

In Android phones, developer mode is a very useful tool that can provide users with more operating permissions and debugging options. By turning on developer mode, you can have more control and customize your phone to suit your personal needs. If you own an iQOO Z9 phone and want to enable developer mode, the following will provide you with step-by-step instructions. How to enable developer mode on iqooz9? 1. First we enter “Settings”. 2. Then click "System Management". 3. Then click "About Phone". 4. Then click "Version Information". 5. Finally, click "Software Version Number" seven times to open it. Now you can explore more advanced options and settings to further improve your phone experience. Please remember that when opening

How to turn off developer mode in iqooz9? How to turn off developer mode in iqooz9? Mar 19, 2024 am 09:37 AM

iQOOZ9 is a powerful smartphone with many advanced features and setting options. Among them, developer mode is one of the functions that allows users to perform more advanced debugging and customization operations. However, sometimes we may no longer need developer mode, or wish to turn it off to ensure the security and stability of our device. If you want to know how to turn off the developer mode of iQOOZ9, detailed step-by-step guidance is provided below. How to turn off developer mode in iqooz9? 1. Swipe down from the left side of the status bar to bring up the notification bar, and click on the notification "In Development Mode" to turn off Developer Options; 2. Enter Settings - System Management/More Settings - Developer Options - Turn off "Developer Options" "; 3. Enter Settings--System Management/More Settings

How to enter developer mode in opporeno5pro+_Tutorial on opening developer options in opporeno5pro+ How to enter developer mode in opporeno5pro+_Tutorial on opening developer options in opporeno5pro+ Mar 25, 2024 am 11:06 AM

1. Open Settings and click [About Phone]. 2. Click [Version Number]. 3. After entering, click the version number continuously to open the developer mode.

How to turn on the developer mode of the official version of iOS 17.2.1? How to turn on the developer mode of the official version of iOS 17.2.1? Jan 12, 2024 am 08:12 AM

"Developer Mode" provides us with more advanced settings and debugging options to meet our research and development needs. Some users don't know how to turn on the "developer mode" after upgrading to the official version of iOS 17.2.1. How to turn on the "developer mode" in the official version of iOS 17.2.1? If you want to enable "Developer Mode" after upgrading to the official version of iOS 17.2.1, you can refer to the following steps: Before activating "Developer Mode", you cannot find "Developer Mode" in the iPhone device settings. We need to activate it. Developer Mode"! Step 1: Open and enter [Toolbox]-[Virtual Positioning]; Step 2: Directly click [Modify Virtual Positioning] to activate "Developer Mode"; a prompt will pop up to remind you to enter the iPhone

See all articles