# createSession() requires at least one resource

**URL:** <https://forum.wixstudio.com/t/createsession-requires-at-least-one-resource/73311>\
**Category:** Ask the community\
**Tags:** wix-bookings-backend, wix-bookings, code, question\
**Created:** [September 3, 2025, 5:55pm UTC](https://forum.wixstudio.com/t/createsession-requires-at-least-one-resource/73311 "2025-09-03T17:55:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mick](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/mick/32/101480_2.png) [@Mick](https://forum.wixstudio.com/u/Mick)\
**Post date:** [September 3, 2025, 5:55pm UTC](https://forum.wixstudio.com/t/createsession-requires-at-least-one-resource/73311/1 "2025-09-03T17:55:51Z")

</div>

I have a question regarding the createSession() function on velo. I am attempting to add new sessions to my service (under wix bookings). However, I am met with this error. I am perplexed by the error as the function doesn’t require “resources” as a parameter. I have also tried assigning resources to the service in the wix dashboard but the same error occurs. I tried querying existing sessions but I do not see a “resources” being returned in the object.

For reference, I used the service’s scheduleId for the createSession() function, the parameters I entered into the function is consistent with what I retrieved in the return object from existing sessions (which were added through the wix dashboard). The service I am trying to add sessions for is a class type.

 ![image](https://us1.discourse-cdn.com/wix/original/3X/4/8/483a188a001ba481b02e3314abb3cd54f8efae73.png)

If anyone requires the codes, here they are

Backend (exported to page):

**export**  **const** createNonRecurringSessions = webMethod(

```
Permissions.Anyone,

(sessionInfo) => {

    **const** options = { suppressAuth: **true** };

    **return** sessions

        .createSession(sessionInfo, options)

        .then((session) => {

            **return** session;

        })

        . **catch** ((error) => {

            console.error("Failed to create session:", error);

        });

},

```

);

Page codes:  
**const** sessionInfo = {

```
    scheduleId: "2dd4802f-de2b-440f-bd20-a94da5e6a9da",

    start: { timestamp: **new** Date("2025-09-15T12:00:00.000-07:00"), },

    end: { timestamp: **new** Date("2025-09-15T13:00:00.000-07:00"), },

    type: "EVENT"

};

```

// This part triggers the function on click

$w(‘#button9’).onClick( **async** () =\> {

```
    **const** test = **await** createNonRecurringSessions(sessionInfo)

    console.log("Created session", test)

});

```
