Hello,
I am building a custom ticketing experience using Wix Events API.
I am following step by step the Ticketing lifecycle in the API documentation https://www.wix.com/velo/reference/wix-events/tickets-obj/reserve.
function reserveTickets() {
const selectedTickets = getSelectedTickets();
console.log ("Ticket ID: " + selectedTickets[0].ticketId);
console.log ("Event ID " + eventId);
console.log ("Selected Tickets Array " + selectedTickets);
wixEvents.tickets.reserve(eventId, selectedTickets)
.then((reservation) => {
reservationId = reservation.id;
})
.catch((error) => {
console.log("Error", error.message)
});
}
The console logs correctly both the Event ID, the Ticket ID, and the array of tickets I would like to reserve…but then it throws an Ambassador client request failed - HTTP 403 error I do not understand. ![]()
Ticket ID e8056934-201b-465a-9604-76a39d4107ba
workerLogger.js:103 Event ID cd8344d3-cb5a-4075-a4d5-0763ef2b8dee
workerLogger.js:103 Selected Tickets Array [object Object],[object Object]
workerLogger.js:103 Error Ambassador client request failed:
HTTP STATUS: 403
RESPONSE: "[object Object]"
See the httpStatus and response fields for more information.
I would appreciate any help or input on what I am doing wrong.
Thanks a lot!
Matteo