Error creating contact

All I want to do is to create a contact so that I can send a triggered email to that user. So far no luck, hoping for some inspiration. I have the following client-side code:

import wixCRM from ‘wix-crm’;

return new Promise( function (resolve, reject) {
wixCRM.createContact( { “firstName”: firstname, “lastName”: lastname, “emails”: [email], “phones”: [phone] } )
.then( (contactId) => {
resolve(contactId);
})
. catch (err => {
console.log("Error: " + err);
reject(err);
})

All I get is this: Error: Internal Server Error (500)
reported from the catch block. I tried doing this server-side and got 403 permissions error.
I’m doing this is preview mode - not production.
Thoughts?

Seems to work in production mode. NFI