REST API:无法创建小部件

时间:2016-03-24 08:29:09

标签: rest echosign

在此页面上https://secure.na1.echosign.com/public/docs/restapi/v5#WidgetFileInfo我正在尝试创建小部件(POST /小部件)。 以下是来自服务器的WidgetCreationRequest exmaples和响应。

{"widgetCreationInfo":{"name":"SomeRandom","signatureFlow":"SENDER_SIGNATURE_NOT_REQUIRED","fileInfos":[{"documentURL":{"name":"83011.pdf","url":"http:\/\/www.state.gov\/documents\/organization\/83011.pdf","mimeType":"application\/pdf"}}]}}

服务器正在考虑(1-2分钟)并给出" BAD_REQUEST"响应。

{"widgetCreationInfo":{"formFieldLayerTemplates":[{"documentURL":{"name":"83011.pdf","url":"http:\/\/www.state.gov\/documents\/organization\/83011.pdf","mimeType":"application\/pdf"}}],"name":"SomeRandom","signatureFlow":"SENDER_SIGNATURE_NOT_REQUIRED","fileInfos":[{"documentURL":{"name":"83011.pdf","url":"http:\/\/www.state.gov\/documents\/organization\/83011.pdf","mimeType":"application\/pdf"}}]}}

我不知道为什么我决定使用formFieldLayerTemplates,但这次服务器说You cannot work on behalf of this user

文档是从谷歌随机拍摄的。 请帮我创建一个小部件,我绝望了!

1 个答案:

答案 0 :(得分:3)

您的第一个请求绝对正确。似乎有一些特定于URL的问题。我刚刚尝试使用以下公共网址:https://www.researchgate.net/profile/Donald_Specht/publication/220360902_Probabilistic_Neural_Networks._Neural_Networks_3109-118/links/0c96051b63d9acfb5e000000.pdf,它运行正常。你可以试试吗?