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
- Error 503 Response object too large
I have a video embedded in an iframe. I've tried hosting the file with my site source, using appwrite storage and even via youtube. It works fine locally, works...
- Does a user need to be registered in App...
If I want to send an email (for example, to xyz@gmail.com) from an Appwrite Cloud Function, does that email address need to be registered as a user in Appwrite?...
- endpoint variable
Appwrite Sites passes e.g. APPWRITE_SITE_API_ENDPOINT to the site, but i need this variable in Next.js in my Client-Side-Page. How can i pass it? Next.js only p...