
Heyo,
I'm getting Invalid document structure: Unknown attribute: "data"
in my function, using this as my code:
TypeScript
const response = await databases.createDocument(
'hp_db',
'userdata',
document.$id,
{
data: {
status: "I'm new here!",
profileUrl: document.$id,
username: document.name,
},
permissions: [
`read(\"user:${document.$id}\")`,
`update(\"user:${document.$id}\")`,
`delete(\"user:${document.$id}\")`,
],
}
);
Am I missing something? Creating it using an API Key
TL;DR
Issue with document creation function due to an attribute error 'data'. Check if the database supports the 'data' attribute. Also, ensure correct API Key usage for document creation.Recommended threads
- Realtime Disconnects and Error: INVALID_...
Hi Support, we are still experiencing the issue and we are a subscriber on your platform under the account of charlesbcalague@gmail.com I just want to ask here...
- Collection Permission issue
I am facing issue in my Pro account. "Add" button is disabled while adding permission in DB collection settings.
- Origin error after changing default port...
Hi! I need some help regarding an issue I’m facing with Appwrite after changing the default ports. I have a self-hosted Appwrite instance running on my VPS. I ...
