跳到主要内容
未找到任何项目。
dropboxsign 徽标
为什么选择 Dropbox Sign?
展开或折叠手风琴

您可以做什么

在线签署文档
创建电子签名
选择或创建模板
填写和签署 PDF
完成线上合同
文档管理
探索功能
向右箭头图标

用例

销售与业务拓展
人力资源
初创公司
金融科技
房地产
按需服务
产品
展开或折叠手风琴
Dropbox 图标
Sign
实现轻松发送和签字
Dropbox 图标
Sign API
将电子签名集成到您的工作流程中
dropbox fax 图标
Fax
无需传真机便能发送传真
dropbox 集成图标
集成
无缝集成助力您轻松工作
资源
展开或折叠手风琴
博客
工作流程专业知识和产品新闻
客户案例
讲述取得实际成果的真实故事
帮助中心
关于我们产品的深入指南
资源库
报告、视频和信息表
开发人员
定价
展开或折叠手风琴
Dropbox Sign 定价
找到适合您的套餐
Dropbox Sign API 定价
讲述取得实际成果的真实故事
与销售人员联系
注册
联系销售人员
登录
展开或折叠手风琴
Dropbox Sign
Dropbox Forms
Dropbox Fax
免费试用版
博客
/
开发人员

Using Dropbox Sign API Callbacks

by 
Ana Orozco
December 13, 2019
3
分钟阅读时间
"Using Dropbox Sign API Callbacks" header image
工具提示图标

外观全新但功能同样出色的产品!HelloSign 现为 Dropbox Sign。

关闭图标

Let’s start by defining callbacks (otherwise known as webhooks). There are two ways two apps can communicate with each other to share information: polling and callbacks. Polling is like going on a roadtrip and asking the driver “are we there yet?” every 5 minutes. Callbacks are like falling asleep and having the driver wake you up once you are finally there.

‍

Callbacks are automated messages sent from apps to notify that something happened. They have a payload (or body) and are sent to a unique URL.

‍

The Dropbox Sign API sends callbacks for the life cycle of a signature request. Instead of calling the API to check the status of a request, you can listen for these callbacks to build a reliable flow in your application.

‍

Let’s take the example of creating a simple signature request. After you call the “signature_request/create_embedded” endpoint, you receive a response from the API with a status (“200” if it was successful. Otherwise, learn our error messages) and a JSON containing information pertinent to the call you made. This response is useful because it gives you basic information about the request, lets you know that our server received it successfully and there were no issues with the parameters you passed in.

‍

Here is what is happening behind the scenes:

A diagram showing a callback with Dropbox Sign API

‍

If, for example, there was an issue during document processing because the uploaded document has a text tag that is malformed, this is flagged as an error and our API will want to notify you that this happened through a callback event. Wouldn’t it be nice for you to know there was an issue with your file right away instead of having to figure it out the hard way?

‍

This is why it is a best practice to wait for the “signature_request_sent” callback (which only fires once document processing is complete) before attempting to open a sign url in the iFrame. In the case of the error we used as an example, a “file_error” callback will be sent instead. This is how an example of the “file_error” callback event will look like in the API Dashboard:

Screenshot of the "file_error" callback event in the Dropbox Sign API dashboard
Note: to see something like the above, you need to make sure to be logged in with the  Dropbox Sign account that owns the app the requests are being made with.

‍

Another example of when you can benefit from callbacks is downloading the final (signed) document. The “signature_request_all_signed” callback will trigger only after all the signers have completed the document and it’s ready for download. In this case, a best practice is to wait for the “signature_request_all_signed” callback event and then trigger the document download. This ensures that you will get the final copy of the document with all signatures and the “completed” status on the audit trail.

Responding to callbacks

The Dropbox Sign API will send callbacks to whatever URL you tell it to. You can set your account callback by using the account API call or manually on the settings page.

‍

Your endpoint will need to return a 200 HTTP code and a response body containing the following text: “Hello API Event Received.” Otherwise, the callback will be considered a failure and will be retried later. Refer to the “Events and Callbacks” article for more information on this. To illustrate the workflow:

‍

Diagram showing how to respond to callbacks using the Dropbox Sign API

‍

Other resources on this topic:

Example Dropbox Sign API Callback Event

The difference between signature_request_signed and all_signed callback events.

Example Java Callback Handler

Simple PHP Callback Handler

A Simple Python Callback Handler

Example of how to use ngrok (or other localhost tunneling software) to test callback handlers

Tools for Testing the API and Callbacks Locally

保持更新

完成!请检查您的收件箱。

Thank you!
Thank you for subscribing!

Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Lorem ipsum
向右箭头图标
关闭图标

Up next:

手写签名的特写插图,代表现代数字签名解决方案。
开发人员
15
分钟阅读时间

将 Dropbox Sign 与 Ruby on Rails 集成:分步教程

手写签名的特写插图,代表现代数字签名解决方案。
开发人员
15
分钟阅读时间

Dropbox Sign vs. SignNow for developers

电子书

如何构建最终员工入职清单

产品
Dropbox SignDropbox Sign APIDropbox Fax集成
为什么选择 Dropbox Sign
电子签名签署文档签署和填写 PDF在线合同创建电子签名签名编辑器签署 Word 文档
支持
帮助中心与销售人员联系联系支持人员管理 Cookie开始使用:Dropbox Sign开始使用:Dropbox Sign API
资源
博客客户案例资源中心合法性指南信任中心
合作伙伴
战略合作伙伴合作伙伴查找工具
公司
招贤纳士条款隐私
Facebook 图标YouTube 图标

接受的付款方式

Mastercard 徽标Visa 徽标American Express 徽标Discover 徽标
CPA 合规标记HIPAA 合规标记Sky High Enterprise Ready 标记ISO 9001 认证标志

在美国、欧盟、英国和世界许多其他地区,Dropbox Sign 电子签名均具有法律约束力。
如需了解更多信息,请查看我们的条款和条件以及隐私政策