SignNowNodeSDK icon indicating copy to clipboard operation
SignNowNodeSDK copied to clipboard

"error": "Error 500: TypeError: Cannot read properties of undefined (reading 'unique_id')"

Open neilreyes opened this issue 2 years ago • 0 comments

I'm testing this tutorial 'Creates a link for the embedded invite.' and one of the example.

It returns this error: "error": "Error 500: TypeError: Cannot read properties of undefined (reading 'unique_id')"

My code is below:

``const email_address = 'mygmail.com';
const templateDocId= 'docIdStringhere'  //SignNow templateId;
const fieldInvite = {
            unique_id: templateDocId,
            from: "mygmail.com",
            to: [
                {
                    email: email_address,
                    role: "Signer 1",
                    order: 1,
                    reassign: "0",
                    decline_by_signature: "0",
                    reminder: 4,
                    expiration_days: 27,
                    subject: "Field invite Signer1",
                    message: "Message",
                },
            ],
        };
const sign_invite = await new Promise((resolve, reject) => {
            signNowAPI.template.invite(
                {
                    data: {
                        ...fieldInvite,
                    },
                    id: templateDocId,
                    token: signNowToken,
                },
                (error, response) => {
                    if (error) {
                        reject(error);
                    } else {
                        resolve(response);
                    }
                }
            );
        });
        ``
        ```

neilreyes avatar Apr 30 '23 23:04 neilreyes