docusign / code-examples-python

Docusign Python code examples and launcher
https://developers.docusign.com/
MIT License
44 stars 55 forks source link

Issue with create_recipient_view not populating fields or enabling signing #40

Open camilopulidoms opened 1 month ago

camilopulidoms commented 1 month ago

Hi,

I'm encountering an issue with the create_recipient_view method in the eSignature examples. My goal is to use this method to allow users to sign documents via a web-view. Here's the relevant code snippet I'm using:

recipient_view_request = RecipientViewRequest(
    authentication_method=authentication_method,
    client_user_id=envelope_args["signer_client_id"],
    recipient_id="1",
    return_url=envelope_args["ds_return_url"],
    user_name=envelope_args["signer_name"],
    email=envelope_args["signer_email"]
)

results = envelopes_api.create_recipient_view(
    account_id=args["account_id"],
    envelope_id=envelope_id,
    recipient_view_request=recipient_view_request
)

return {"envelope_id": envelope_id, "redirect_url": results.url}

The issue I'm facing is that the generated URL returns a PDF document without the option to sign, and the fields that should be automatically populated remain empty.

I want to emphasize that my email flow works correctly: it generates an envelope with dynamically filled fields and provides the signing options. The problem only arises when using the create_recipient_view method.

Is there something I'm missing in the RecipientViewRequest configuration? Any help or guidance would be greatly appreciated.

Thank you!

karankaushik95 commented 1 month ago

Hard to tell what could be happening without looking into your request and the parameters that were sent. Please open a support case with Docusign Developer Support so we can look into this.

InbarGazit commented 1 month ago

client_user_id=envelope_args["signer_client_id" This value should also be on the recipient/signer you want. Can you post the rest of your code?

InbarGazit commented 1 month ago

https://github.com/docusign/code-examples-python/blob/90585548532688ba73d98e39fabc9f504f20b02b/app/eSignature/examples/eg001_embedded_signing.py#L110C8-L119C10 This code:

        # Create the signer recipient model
        signer = Signer(
            # The signer
            email=args["signer_email"],
            name=args["signer_name"],
            recipient_id="1",
            routing_order="1",
            # Setting the client_user_id marks the signer as embedded
            client_user_id=args["signer_client_id"]
        )