Pgyer internal test distribution service is a leading mobile application internal test distribution platform in China, dedicated to providing easy-to-use App internal test distribution services for mobile developers and test users.
Pgyer Developer Service Platform is committed to providing excellent upstream and downstream services for developers, addressing the various needs of developers throughout the developer life cycle.
Scan QR code to follow
Pgyer WeChat Official Account
Get the latest news, official benefits, promotions and other information
Pgyer document center
Webhook 就是用戶通過自定義回調的方式來改變 Web 應用的一種行為,這些回調可以由不是該 Web 應用官方的第三方用戶或者開發人員來維護,修改。通過 Webhook,你可以自定義一些行為通知到指定的 URL 去。
在蒲公英中,使用 Webhook 功能,開發者可以將蒲公英上的部分事件消息,同步到另一個平臺(或網站)上去。例如:開發者在蒲公英平臺中,上傳了一個應用版本、或者收到一條用戶反饋時,蒲公英都會將這個消息推送到開發者制定的一個指定 URL 上去。
目前,蒲公英支持如下三種事件類型:
首先進入 應用管理
,點擊一個 應用名稱
,之后在點擊 設置
-> Webbook
中,即可看到針對該應用的 Webhook 設置。第一次進入該頁面時,會直接顯示出創建 Webhook 的頁面,如圖所示:
在圖中,按照提示填寫以下內容:
Webhook 名稱
給即將創建的 Webhook 起一個名字。例如:WebhookTest 等URL
設置蒲公英在發生事件時,將事件的消息推送到哪里。也就是說,接受蒲公英事件的 URL。如果是需要集成紛紜或 HiWork 等服務 ,該 URL 由紛紜或 HiWork 提供。選擇要推送的功能
設置蒲公英將哪些事件消息發送給上面填寫的 URLWebhook 狀態
可以打開或者關閉蒲公英發送事件填寫好之后,點擊 保存信息
按鈕,即可成功創建一條 Webhook 。這樣,蒲公英就會在上述相關事件發生時,將消息推送到剛剛設置的 URL 上。
蒲公英支持對同一個應用設置多個 Webhook,開發者可以重復上述過程,再次創建即可。但是同一個應用最多只能添加 3 個 Webhook。
如果開發者是自己開發 Webhook 服務或者僅僅想測試,推薦使用 Request
服務(http://request.lesschat.com/)。
蒲公英針對第三方的 Webhook 服務,當蒲公英發送事件時,使用 HTTP POST
請求,Content-Type
為 application/json
,數據格式為 JSON
。 例如,有應用的新版本上傳時,蒲公英發送的數據格式類似如下形式(實際情況下會有稍許不同):
{
"action": "應用更新",
"title": "OooPlay",
"link": "http://www.credom.org/oooplay_test",
"message": "您的應用OooPlay有了新的版本(2.4)更新。",
"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": "修復了一些小弱智的小bug"
}
當應用收到『搖一搖反饋』信息時,蒲公英會發送如下類似格式的數據(實際情況下會有稍許不同):
{
"action": "應用反饋",
"title": "OooPlay",
"link": "http://www.credom.org/oooplay_test",
"message": "您的應用OooPlay收到一條新的反饋信息",
"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": "修復了一些小弱智的小bug"
}
當應用收到 Crash Log 信息時,蒲公英會發送如下類似格式的數據(實際情況下會有稍許不同):
{
"action": "Crash log",
"title": "OooPlay",
"link": "http://www.credom.org/oooplay_test",
"message": "您的應用OooPlay收到了新的Crash Log",
"type": "crashlog",
"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": "libsystem_kernel.dylib 0x3094c49c mach_msg_trap 20 CoreFoundation 0x21edf7f3 <redacted> 146 CoreFoundation 0x21edddb9 <redacted> 1016 ..."
}
第三方 Webhook 服務可以使用獲取 POST RAW 數據的方式來獲取消息數據。例如,在 PHP 中可以用如下方式獲取數據:
$data = file_get_contents('php://input');
或者:
$data = $HTTP_RAW_POST_DATA;
獲取到數據之后,再進行 JSON DECODE 即可解析出具體的數據,例如:
$info = json_decode($data, true);
之后,第三方 Webhook 服務即可將獲取到的消息數據,根據自身的業務邏輯進行相應處理,例如可以顯示在自己平臺的消息流、或通知中心等。
About Us
Product Services
Help
Your account information is under review and can not be used temporarily; you can:
Check out the help documentation for common ways to work on the Pgyer's platform;
Check Pgyer's App Auditing , which must be viewed before uploading.
Currently, the real-name authentication has not been completed, and the number of downloads for each version is limited to 5 times/day, After real-name authentication, it can be extended to 500 times/day
TestFlight is only available to Professional users.(Click understand pgyer's price plan)
支付成功
Pgyer VIP User Group
(Please open WeChat - Sweep and join the group chat)