Question:
I’m trying to call querySubmissionsByNamespace but it never returns any item.
What are you trying to achieve:
I want to get all submissions from a form.
What have you already tried:
1 - Following the docs, I first tried to call querySubmissionsByNamespace
with no parameters and got this error:
const rr = await wixClient.submissions
.querySubmissionsByNamespace()
.find();
Error on query: Error: message: namespace filter is required
details:
applicationError:
description: namespace filter is required
code: MISSING_NAMESPACE_FILTER
data: {}
(Documentation with the wrong sample)
2 - So I added the namespace wix.form_app.form
or WIX
, and both returned, but with no items.
const rr = await wixClient.submissions
.querySubmissionsByNamespace()
.eq('namespace', 'WIX')
.find();
CursorBasedIterator {
_items: [],
...
}
So, I don’t know why I’m not able to get the submissions.
I’m using ApiKeyStrategy like this
const wixClient = createClient({
modules: { submissions },
auth: ApiKeyStrategy({
apiKey: process.env.WIX_API_KEY,
siteId: process.env.WIX_SITE_ID,
}),
});
Where:
- apiKey: Got from Log In to Your Wix Account - Wix.com, starting with
IST.
- siteId: Got a webhook data from
context.metaSiteId
…
Since Wix doest offer support for developers, could you help me please!?