所有收藏
集成
API
Digify Webhook
Digify Webhook
Francesca Diyco avatar
作者:Francesca Diyco
一周前更新

Webhooks 是您可以订阅的通知,当您发送的文件(如查看、打印或下载文件)发生变化时,您可以接收 API 更新。

Digify 会将事件详情以 JSON 格式发布到您的 Webhook URL。首先,您需要 "创建 Digify Webhook "并提供以下信息:

  1. 合适的网络钩子 "描述"

  2. 供 Digify 发送网络钩子的 URL

  3. "用于基本身份验证的 "用户名 ""密码

Digify Webhook 在以下事件中发送:

  1. 查看文件时。

  2. 打印文件时。

  3. 下载文件时。

网络钩子事件包含以下属性:

1. AccessType - 该属性的值由设置的文件权限决定。

  • "Anyone" - 任何拥有文件链接的人都可以访问文件。RecipientUserEmailRecipientFirstName RecipientLastName 属性将为空。

  • "有电子邮件的任何人"--有文件链接并提供了电子邮件地址的任何人都可以访问文件。RecipientUserEmail 属性将返回收件人提供的电子邮件地址。

  • "验证用户"- 已验证电子邮件或已创建账户的 Digify 用户可以访问文件。RecipientUserEmailRecipientFirstName RecipientLastName 属性将返回用户的详细信息。

(注:如果用户已验证其电子邮件地址,但尚未创建 Digify 账户,则 RecipientFirstName 属性将返回收件人的电子邮件地址,而 RecipientLastName 属性将为空。)

2. EventTime - 触发事件的时间。

3. FileGUID - 分配给发送文件的 ID。

4. FileName - 发送文件的名称。

5. 链接 - 发送文件的链接。

6. RecipientFirstName - 收件人的名字

7. RecipientLastName - 收件人的姓

8. RecipientUserEmail - 收件人的电子邮件地址

9. Type - 网络钩子事件类型。可以是 "查看、打印或下载"。

网络钩子示例

查看事件

查看事件将在以下情况下触发:

  • 如果权限设置为 "限制",则在每个收件人首次打开文件时发送 Webhook。

  • 如果权限设置为 "公开 "且 RequestEmail 设置为 "false",则在第一个收件人打开文件时发送 webhook。

  • 如果权限设置为 "公开 "且 RequestEmail 设置为 "true",则每次打开文件时都会发送 webhook。

Content-Type: application/json
Accept-Encoding: gzip
Cf-Ray: 371d1ddc6be1192c-HKG
Cf-Visitor: {"scheme":"https"}
Authorization: Basic dGVzaDpEZW1vMTIzNA==
Connection: close
Total-Route-Time: 0
Host: requestb.in
Via: 1.1 vegur
Connect-Time: 0
Content-Length: 255
X-Request-Id: c7ab2411-da1b-4a4e-aa40-ebb227d3a443

{
"RecipientUserEmail": "tester1@email.com",
"RecipientFirstName": "Digify",
"RecipientLastName": "Tester1",
"FileGUID": "1f51447850d247d791a5d9c295af79c5",
"FileName": "secret.pdf",
"Type": "View",
"EventTime": "2017-06-20T07:46:50.6762428Z"
"AccessType": "Verified User"
}

打印事件

当收件人打印文件时,将触发打印事件。

Content-Type: application/json
Accept-Encoding: gzip
Cf-Ray: 371d1ddc6be1192c-HKG
Cf-Visitor: {"scheme":"https"}
Authorization: Basic dGVzaDpEZW1vMTIzNA==
Connection: close
Total-Route-Time: 0
Host: requestb.in
Via: 1.1 vegur
Connect-Time: 0
Content-Length: 255
X-Request-Id: c7ab2411-da1b-4a4e-aa40-ebb227d3a443

{
"RecipientUserEmail": "tester1@email.com",
"RecipientFirstName": "Digify",
"RecipientLastName": "Tester1",
"FileGUID": "1f51447850d247d791a5d9c295af79c5",
"FileName": "secret.pdf",
"Type": "Print",
"EventTime": "2017-06-20T07:46:50.6762428Z"
"AccessType": "Verified User"
}

下载事件

收件人下载文件时将触发下载事件。

Content-Type: application/json
Accept-Encoding: gzip
Cf-Ray: 371d1ddc6be1192c-HKG
Cf-Visitor: {"scheme":"https"}
Authorization: Basic dGVzaDpEZW1vMTIzNA==
Connection: close
Total-Route-Time: 0
Host: requestb.in
Via: 1.1 vegur
Connect-Time: 0
Content-Length: 255
X-Request-Id: c7ab2411-da1b-4a4e-aa40-ebb227d3a443

{
"RecipientUserEmail": "tester1@email.com",
"RecipientFirstName": "Digify",
"RecipientLastName": "Tester1",
"FileGUID": "1f51447850d247d791a5d9c295af79c5",
"FileName": "secret.pdf",
"Type": "Download",
"EventTime": "2017-06-20T07:46:50.6762428Z"
"AccessType": "Verified User"
}


译文由人工智能生成,可能存在不准确之处,敬请谅解。

这是否解答了您的问题?