I am trying to create restful API call to DocuSign in order to fetch a list of all available templates. I found the link of the DocuSign implementation for such call type: DocuSign - Templates: list . I am having trouble understanding exactly how to build the URL. According to the doucmentation, I need to use the following api url:
GET /v2.1/accounts/{accountId}/templates
So, from what I see this is a GET http call, I have my accountID, which I am also able to fetch from a successful authentication via Jquery AJAX, I then usedthe Bearer token to access the user info via Postman for further testing:
Now, my question is: in order to get a list of all the available templates, what is the complete URL? Of course, /v2.1/accounts/{accountId}/templates is not a complete url. I used the https://account-d.docusign.com url or the oauth process, but it is not working for listing templates. It just redirects me to the login page. I then tried using the "base_uri" provided in the userinfo call which is seen in the image above. However I get a 404 response stating that file or directory not found.
How would I build an ajax call to make this work? Here is what I have so far:
The URL should be:
https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/templates
Hope that helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.