我正在尝试使用 rest api 在 adobe 符号中创建一个临时文档。以下是我的代码片段:
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint('https://api.in1.echosign.com/api/rest/v6/transientDocuments');
req.setMethod(postMethod);
req.setHeader('Content-Type', 'application/json');
blob testFileContent = blob.toPDF('test string it is');
// req.setBody('{"filename":"testsign","file":'+testFileContent+'}');
req.setBody('{"fileName":"testsign","file":"'+testFileContent+'"}');
String authorizationHeader = 'Bearer ' +acceessToken;
req.setHeader('Authorization', authorizationHeader);
//req.setHeader('Authorization', acceessToken);
try{
HttpResponse res = h.send(req);
但是我在响应中收到错误的请求错误。问题可能是由于标签与 adobe 签名要求不匹配,但是经过大量研究和反复试验后,我无法找到准确的标签以将此 API 请求放入 JSON . 有什么建议和帮助吗?