Hi all, I want to create envelope but I receive the following error: errorCode":"UNSPECIFIED_ERROR","message":"Cannot find recipient with ID '1'.
The code:
EnvelopeDefinition envelopeDefinition = new EnvelopeDefinition();envelopeDefinition.setTemplateId(properties.getTemplateId());TemplateRole signer = new TemplateRole();signer.setEmail(“test@gmail.com”);signer.setName(“Test Test”);signer.clientUserId(“123456789”);signer.setRoleName("signer");Tabs tabs = fillTabs();signer.setTabs(tabs);envelopeDefinition.setTemplateRoles(List.of(signer));envelopeDefinition.setStatus("sent");
EnvelopesApi envelopesApi = new EnvelopesApi(getApiClient());EnvelopeSummary summary = envelopesApi.createEnvelope(accountId, envelopeDefinition);
Is there something I do wrong? What can be a reason for this error?
Best answer by JohnSantos
@Radi
The error message "Cannot find recipient with ID '1'" typically indicates an issue with how the recipient information is being defined or referenced in the envelope creation process. Based on your provided code, there are a few areas to check and correct:
Ensure Correct Usage of clientUserId: The clientUserId is used for embedded signing scenarios. If the recipient is not an embedded signer, you don't need to set this value. If it's necessary, ensure it's correctly set.
Check Template Role and IDs: Verify that the role name used in your code matches exactly with the role defined in your template. Ensure the role name "signer" matches what's in the template.
Proper Initialization of Tabs: The fillTabs() function should return a properly initialized Tabs object. Ensure that this function correctly sets up all necessary tabs.
The error message "Cannot find recipient with ID '1'" typically indicates an issue with how the recipient information is being defined or referenced in the envelope creation process. Based on your provided code, there are a few areas to check and correct:
Ensure Correct Usage of clientUserId: The clientUserId is used for embedded signing scenarios. If the recipient is not an embedded signer, you don't need to set this value. If it's necessary, ensure it's correctly set.
Check Template Role and IDs: Verify that the role name used in your code matches exactly with the role defined in your template. Ensure the role name "signer" matches what's in the template.
Proper Initialization of Tabs: The fillTabs() function should return a properly initialized Tabs object. Ensure that this function correctly sets up all necessary tabs.
You can login or register as either a Docusign customer or developer. If you don’t already have a Docusign customer or developer account, you can create one for free when registering.
You can login or register as either a Docusign customer or developer. If you don’t already have a Docusign customer or developer account, you can create one for free when registering.