Triggering Email on Button Click Error- Bad Request: please check user inputs

Here is my code-

import { triggeredEmails } from 'wix-crm';
const contactId = 'contact-id-that-i-got-from-address-bar';
$w.onReady(function () {
    	$w('#submitButton').onClick(function () {
        		triggeredEmails.emailContact('T1YaVBq', contactId)
                                .then(()=> console.log('success'))
                                .catch(err => console.log('err', err));
    	});
});

Error I’m getting in the console-

err Bad Request: please check the user inputs

Any help is appreciated

1 Like

found the solution- Velo Tutorial: Sending an Email on Form Submission | Help Center | Wix.com

Did you actually find the solution to " Bad Request: please check the user inputs" or did you switch to sendgrid?

was it resolved?

Same error, what is the resolution. I need to send the email template using triggeredemails.

1 Like