Pgyer document center

Webhook Setting

What is Webhook

Webhook is a way for users to change the behavior of a web application by customizing callbacks, which can be maintained and modified by third-party users or developers who are not the official users of the web application. Through Webhook, developers can customize behavior notifications to specific URLs.

In PGYER, using the Webhook feature, developers can synchronize some event messages from PGYER to another platform (or website). For example, when a developer uploads an application version or receives user feedback on the PGYER platform, PGYER will push this message to a specified URL specified by the developer.

Currently, PGYER supports the following 6 types of events: application updates, version changes, application feedback, app settings changes, app migration, and app deletion.

How to set up PGYER Webhook

  1. Set basic information Go to the application Settings - Webhook Settings, click Create Webhook, fill in the Webhook name, and select Webhook type.
  2. Set the Webhook URL Fill in the URL for receiving messages based on the specific Webhook type. For example, if you want to receive notifications on Enterprise WeChat, fill in the Webhook URL assigned by Enterprise WeChat.
  3. Select subscription content Select the application message content that needs to be subscribed to, and set the Webhook status to enabled. Click Save Information to successfully set the message robot.

In this way, PGYER will push the message to the URL just set when the above related events occur.

PGYER supports setting multiple Webhooks for the same application. Developers can repeat the above process and create them again. However, the same application can only add up to 3 Webhooks.

Data Protocol

PGYER is designed for third-party Webhook services. When PGYER sends events, it uses an HTTP POST request with Content Type as application/JSON and data format as JSON. For example, when uploading a new version of an application, the data format sent by PGYER is similar to the following (there may be slight differences in actual situations):

{
"Action": "Application Update",
"Title": "OooPlay",
"Link":“ https://www.pgyer.com/oooplay_test ",",
"Message": "Your application OooPlay has a new version (2.4) update.",
"Type": "updateVersion",
"Os_version": "2.4",
"Build_version": "139",
"Created": "2015-10-09 11:25:16",
"Updated": "2015-10-09 11:25:16",
"Timestamp": 1444361118,
"Appsize": "2238036",
"Device_type": 'iOS',
"Notes": "Fixed some minor bugs with intellectual disabilities"
}

When the application receives feedback, PGYER will send data in a format similar to the following (which may vary slightly in actual situations):

{
"Action": "Application feedback",
"Title": "OooPlay",
"Link":“ https://www.pgyer.com/oooplay_test ",",
"Message": "Your application OooPlay has received a new feedback message",
"Type": "feedback",
"Os_version": "2.4",
"Build_version": "139",
"Created": "2015-10-09 11:25:16",
"Updated": "2015-10-09 11:25:16",
"Timestamp": 1444361118,
"Appsize": "2238036",
"Device_type": 'iOS',
"Notes": "Fixed some minor bugs with intellectual disabilities"
}

When the application receives a Crash Log message, PGYER will send data in a format similar to the following (there may be slight differences in actual situations):

{
"Action": "Crash log",
"Title": "OooPlay",
"Link":“ https://www.pgyer.com/oooplay_test ",",
"Message": "Your application OooPlay has received a new Crash Log",
"Type": "crash log",
"Os_version": "2.4",
"Build_version": "139",
"Created": "2015-10-09 11:25:16",
"Updated": "2015-10-09 11:25:16",
"Timestamp": 1444361118,
"Appsize": "2238036",
"Device_type": 'iOS',
"Notes": "libsystemi_kernel.dylib 0x3094c49c mach_msg_trap 20 CoreFoundation 0x21edf7f3<redacted> 146 CoreFoundation 0x21edddb9 <redacted> 1016..."
}

Third party Webhook services can use the method of obtaining POST RAW data to obtain message data. For example, in PHP, data can be obtained in the following ways:

After obtaining the data, perform JSON decoding to parse the specific data, for example:

$info=JSON_ Decode ($data, true);

Afterwards, third-party Webhook services can process the obtained message data according to their own business logic, such as displaying message flows on their own platform or notification centers.

Enterprise WeChat group messaging robot settings

Please open Enterprise WeChat and find the group that needs to receive messages: 1. Open the group's operation menu and select Add Group Robot. 2. Click Add Robot, enter the robot name and add it. 3. Return to the PGYER Webhook creation page, copy and input the obtained URL address into the Webhook URL.

DingTalk Group Message Robot Settings

  1. Click on the settings in the upper right corner of the group reply page to open the Intelligent Group Assistant.
  2. Click on Add Custom Robot, enter the robot name and settings Security Settings - Custom Keyword as Application, click Finish.
  3. Return to the PGYER message robot creation page, copy and input the obtained URL address into the Webhook URL.

Feishu Group Message Robot Settings

  1. Open Group Settings, find Group Robots, click Add Robots, selectCustom Robots, and add them.
  2. Enter the robot name and description, click Next:
  3. Configure Feishu Group Robot Security Settings - Custom Keyword as Application, copy the Webhook address, click Finish; Enter the copied Webhook URL into the PGYER Webhook URL.