Issue 1 - Now I am using Code Grant and fetched token with refresh token, still it is not working, next day when I am using same token generated with refresh_token is giving error
Issue 2- How can I get uri or path of that file - so that user can click that link - view status - download ?
like https://demo.docussing.com/accountid/envelopeid/documentid some thing like this, once user click on that page it will open that page showing current state of document
StackOverflow is best used as one-topic-per-question. When asking, it's best to provide as much detail as possible about what you're doing, what's wrong, what errors are received, and what you've tried to do to investigate.
For issue 1, access tokens last for eight hours, so when an access token expires you will need to generate a new one. Based on your question, I'm not sure that's happening - Are you able to use the refresh token to generate new access token, or is that what's failing?
For issue 2, there are a few ways to approach. First, your application could directly download the PDF of the envelope (https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopedocuments/get/) and display that. If you would like to take the sender to a DocuSign interface to allow them to view the envelope, there are various Recipient View calls that may be of use: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/
I would recommend testing the SenderView call to see if that meets your needs. An alternative would be the RecipientView call, which can be used with the sender's name and email in the call body to get to a read-only view of the envelope.
Related
This is in reference to the User verification using DocuSign, I am trying to explore the Phone Authentication mode, but I am not getting an option to edit the number/ Choose a new number on the Screen where DocuSign requests for the Access code , I have set the recipMayProvideNumber": to true, but it does not seems to be working , Please help
See this blog post on the topic of recipient authentication.
The number should be passed during the API call like you did. You cannot change it as the signer, only the sender can modify it.
If you want to modify it, you need to make a PUT request to the envelope before it is sent. Once set you can still change it but that would require a new email to also be sent out, the original email with the original link would be invalidated.
So i am using docusign and testing the api with a simple index.php type project and i have successfully sent the document to the email provided in the
$signerEmail = 'test#test.com' using docusign api-client
now after it have signed the document and finish it by clicking at the finish button in docusign window. I want to retrieve the response and document on which it have given its information.
how can i achieve this and right now i am having difficulty to find it in the documentation.
There are 2 ways to do that, synchronously and asynchronously.
Or in other words, if you know the document is already complete, you can run the code, or you can use a webhook with notifications from DocuSign letting you know that the envelope is complete.
Regardless, the API to retrieve a document is this:
GET /v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}
or you can use it from the PHP SDK as well.
Hope this helps.
A full code example (in PHP as well) can be found here - https://developers.docusign.com/esign-rest-api/code-examples/code-example-download-envelope-documents
I'm trying to implement DocuSign (API) in my web application having following requirements.
User should be able to sign a document from our application(web application): (this functionality working as expected)
Next process is (admin) should be able to view particular document along with signed by the user. (from our application)
I am using this API accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId} it gives me PDF response but when I tried to download pdf it nothing display except original document. (we need along with signed)
Apart from this, I tried to open a file using URL which was created during signing ceremony still no luck it's doesn't work after getting signed by the user. (It's getting expired over a time)
So, my question is how we can view a particular document (signed document) within our application?
make sure you have correct envelope that is in "Completed" status.
If you make a GET call to accounts/{accountId}/envelopes/{envelopeId}/documents/ you should get a list of all documents in this envelopes, which should include the completed documents as well and you should be able to download them.
Using the API, I generate the document and place my tags. User goes to sign and decides to finish later. It passes an event="cancelled" to my callback. I make note in my system that they cancelled it. But how can I get them back to the form later? There is no "authentication" with this. I do all the authentication on my end. So I need a URL to send them back to. Using the URL the api gives me to load in iframe expires. So how do I sent them Back to document?
I use PHP by the way.
Here are 2 possible causes (there may be others):
A 'Signing ceremony UX URL' has a short time to live (300 seconds or less I believe) so ensure you are making the call to retrieve a URL right when the user intends to perform the signing session.
A 'Signing ceremony UX URL' can only be rendered once. Verify that you are in fact retrieving a new URL each time and not reusing the original URL.
See this recipe from the DocuSign Developer Center. Repeat step 3 to retrieve a new URL to present to your user.
While working on a DocuSign embedded signing process (which has worked in the past), I noticed that after signing the document the 'event' parameter was missing from the 'returnUrl' I was being sent back to.
The returnUrl looks like:
http://www.example.com/index.php?param1=value1 ... ¶m10=value10
The parameters were being passed on returning from signing, but no event=signing_complete parameter was being added. I tried removing the parameters, and suddenly the event parameter returned.
After further experimentation, I discovered that the returnUrl parameter has a 500 character limit. Anything more is truncated. This will also truncate the event parameter from the end of the returnUrl.
This does not seem to documented in the DocuSign REST API documentation (https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Post%20Recipient%20View.htm).
So, is this a feature or a bug? Other than using session or database storage, is there a recommended workaround for the 500-character limit?
There might be some limits to the URL that is being passed in by the web servers themselves. I have not seen a lot of people hit this limit because probably most of the time folks do not put that much information into a return URL.
If you are coming from software that has session state you can use the following technique:
1) add the information you were previously sending via URL to a dictionary or a collection object and save it in the session on the server. Follow the best security practices for that one so that this information can't be easily accessed (there is a ton of material on how to do this properly and it's probably beyond this answer)
2) in the url instead of all the keys and values just provide the key to your collection.
3) upon return from DocuSign look up the object and retrieve the passed in information.
If there is no state in your software you can try using other properties of the envelope to put the additional information such as envelope custom fields. You can populate those on create and you can retrieve the information back when the control comes back to your software. Here is the article about custom fields: https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#REST API References/Get Envelope Custom Field Information.htm