我在DocuSign帳戶中有2個共享模板。我想檢索共享模板列表。我正在做下面的ajax調用。如何檢索DocuSign共享模板列表
我收到一個200狀態調用,所以調用成功,但DocuSign返回HTML而不是JSON。
var DSTemplateURL = localStorage.getItem("ls_DSurl") + "/v2/accounts/" + localStorage.getItem("ls_DS_accountid") + "/templates?";
var DSData = 'folder=Shared Templates';
request = $.ajax({
headers: { 'Authorization': 'Bearer ' + localStorage.getItem('ls_DSaccess_token') },
type: 'GET',
url: DSTemplateURL,
data: DSData,
//dataType: 'json',
contentType: "application/json",
cache: false
});
我使用的是錯誤的URL。這是錯誤的ajax代碼: – salemanager
我使用的是{base uri}/v2/accounts/{accountId} /模板,而不是{base uri}/restapi/v2/accounts/{accountId}/templates。上述代碼在使用正確的URL時有效。 – salemanager