1

We have integrated docusign into our application and are able to create an Envelope, add signers and create a recipient view url via the docusign API.

The next step is to allow the sender to view the envelope and to do so we are using the create sender view API. We are able to make the request successfully and a url is returned.

Our API that calls the create sender view API:

# the url to return to e.g. https://mywebsite.com
return_url = ReturnUrlRequest(return_url=data["return_url"])

# call the docusign API            
results = envelope_api.create_sender_view(
   session["ds_account_id"], 
   envelope_id, 
   return_url_request=return_url
)


# returns a json object with the url to the client 
return jsonify({"url": results.url}

Example url returned from the docusign api call: https://demo.docusign.net/Member/StartInSession.aspx?StartConsole=1&t=xxxx&DocuEnvelope=xxxx&send=1

The URL is passed to the front-end web application (ReactJs) and it is used to redirect the user to the sender view page. e.g. window.location = response.data.url.

This is where the issue occurs:

  1. Instead of redirecting the user to the docusign website, the user is immediately redirected back to the application.

  2. When I copy the url and manually paste it in a new browser tab it immediately redirects me back to the application, but the second time I visit the url in a new tab it works.

Am I missing something?

Create sender view docs: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createsender/

EDIT: When we set the return_url as an empty string when creating the sender view url, the user isn't immediately redirected.

0

Can you verify the status of the envelopes you are trying to access?

Create Sender view should be used to allow the sender to edit draft envelopes before sending it. In your scenario you mention that the recipient has already viewed it so this may be the problem.

If you want to allow the sender access to edit the envelope after it was sent you will need to use the create correct view API call:

https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createcorrect/

EDIT: If you want the sender to view the completed envelope you should use the create recipient API with the senders information

https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createrecipient/

Your request body should have the following structure:

{
    "authenticationMethod": "Email",
    "email": "sender@email.test",
    "returnUrl": "https://www.google.com/",
    "userName": "Sender",
 
}
2
  • The status of the envelope is "completed". I am trying to create a url to view the completed Envelope in case the user wants to print the documents. Is there another API to do this? – Lawynn Jana Feb 13 at 22:27
  • @LawynnJana Thanks for clarifying. Your best option to accomplish this is to use the create recipient view with the senders information. This should take you into the senders view of the completed documents. I edited my initial response with more details on how to do this – Edwin Feb 16 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.