Rank 4: Virtual Machine
flutter: Server Error: {message: User (role: guests) missing scope (account), code: 401, type: general_unauthorized_scope, version: 1.3.7}
Votes
0
Replies
12
Participants
Unknown
Messages
13
Rank 4: Virtual Machine
flutter: Server Error: {message: User (role: guests) missing scope (account), code: 401, type: general_unauthorized_scope, version: 1.3.7}
Share code snippet please
You might trying to access Account without login which results in this error
Rank 4: Virtual Machine
appWriteLogicExtender.databases.createDocument(
databaseId: "idDB",
collectionId: "idCol",
documentId: ID.unique(),
// permissions: ['"user":userID'],
data: {
"userFullName": nameController.text,
"accountCreationDate": dateTime.timeZoneName,
"userStatus": "normalUser",
"userMail": emailController.text,
"phoneNumber": phoneNumberController.text,
"userID": profile.$id,
});
Rank 4: Virtual Machine
must I have session before that?
Rank 4: Virtual Machine
cause I dont want the document to be created always at login
Rank 4: Virtual Machine
I set permission to any
This should work now
Rank 4: Virtual Machine
I do not know why it did not
Set collection permissions to any with write to true
Rank 4: Virtual Machine
Btw, it's best to use 3 back ticks with multi-line code. See https://www.markdownguide.org/extended-syntax/#syntax-highlighting
Rank 4: Virtual Machine
okay @Steven
I appreciate you