Skip to main content
Solved

UNSPECIFIED_ERROR

  • 22 May 2024
  • 2 replies
  • 111 views

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?

@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:

  1. 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.

  2. 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.

  3. Proper Initialization of Tabs: The fillTabs() function should return a properly initialized Tabs object. Ensure that this function correctly sets up all necessary tabs.


Thank you very much! It was the value of clientUserId.


Reply