top of page
Forum Posts
cfath
May 04, 2023
In Coding with Velo
Dear People with a lot more experience than me: I'm facing an weird issue: I try to code a backend site, where wixEvents can be created by the user.
I used the documentation below, corrected the imbedded mistakes as other users described them (country codes, time formats, etc) but facing this odd behavior:
Running the code (in Preview - so that permission issues should not be a problem) returns an error message with following indications: message: '' details: applicationError: description: Forbidden code: FORBIDDEN data: {}
I am afraid it is an internal bug. Is there any workaround, or does my path simply end there...?
Thanks a lot import { wixEvents } from "wix-events-backend";
const eventInfo = {
title: "Testevent",
location: {
name: "Testname",
address: {
formatted: "Hauptstrasse 12, Seeg, 87637, DE",
city: "Seeg",
subdivision: "Test",
country: "DE",
postalCode: "87637",
streetAddress: {
number: "12",
name: "Hauptstrasse",
apt: "10"
}
},
type: 'VENUE',
},
scheduling: {
timeZoneId: "Europe/London",
startDate: new Date("2024-09-25T12:00:00Z"),
endDate: new Date("2024-09-26T12:00:00Z")
},
registration: {
initialType: 'RSVP'
}
};
const options = {
language: "en"
};
export function myCreateEventFunction() {
console.log("BACKEND: myCreateEventFunction()...");
return wixEvents.createEvent(eventInfo, options)
.then((result) => {
return result;
})
.catch((error) => {
console.error(error);
});
}
0
3
58
cfath
More actions
bottom of page