Skip to content
Back

Bulk inserts

  • 0
  • Databases
apperside
1 Sep, 2025, 10:41

Hello, I am experiencing problems with bulk inserts.

I have a node-appwrite client created like this

` const client = new ServerClient() .setEndpoint(APPWRITE_ENDPOINT!) .setProject(APPWRITE_PROJECT_ID!);

if (jwt) { client.setJWT(jwt); } // const adminClient = getServerAdminClient(jwt);

const accountApi = new ServerAccount(client); const result = { client, databases: new ServerDatabases(client), tables: new ServerTablesDB(client), account: accountApi, }; await appInjection.registerRequestData({ userClient: result }); return result;

`

and then the following code:

`const { tables } = client

TypeScript
  await tables.createRow({
    databaseId,
    tableId: collectionId,
    rowId: ID.unique(),
    data: toSave[0],
  });
  await tables.createRows({
    databaseId,
    tableId: collectionId,
    rows: toSave,
  });
  results.success += batch.length;`

The createRow works, the createRows doesnt, I get this error:

The current user or API key does not have the required scopes to access the requested resource.

What am I doing wrong?

TL;DR
Issue with bulk inserts using node-appwrite client. The createRow works but createRows throws an error "The current user or API key does not have the required scopes to access the requested resource."Check the permissions/scopes set for the user or API key being used.
apperside
1 Sep, 2025, 10:41

Bulk inserts

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more