i have the following function when i added permissions it started to give an error
try {
const client = this.initAppwriteClient();
const teams = new appwriteSdk.Teams(client);
console.log('============================', id, owner);
const permissions = [
appwriteSdk.Permission.read(appwriteSdk.Role.team(id)),
appwriteSdk.Permission.read(appwriteSdk.Role.user(owner)),
appwriteSdk.Permission.write(appwriteSdk.Role.user(owner)),
appwriteSdk.Permission.update(appwriteSdk.Role.user(owner)),
];
await teams.create(id, name, permissions);
} catch (error) {
console.log('error ======>>>>>>', error);
throw new BadRequestException('create new team error', error);
}
}
i am getting this error :
code: 400,
type: 'general_argument_invalid',
response: {
message: "Invalid roles param: Value must a valid array and Parameter must contain at most 36 chars. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char",
code: 400,
type: 'general_argument_invalid',
version: '1.4.2'
}
although i don't have any special char in the id and it match all Valid chars
Uh try removing the permission stuff
but how can i add permissions, i tried adding it on the createMembership, still got the same error
you don't permissions are applied on the resource (collection, document, bucket, file, etc)
Recommended threads
- FCM Message error
When creating a message target via flutter sdk via ``` final target = await _account.createPushTarget( targetId: targetId, identifier: deviceTok...
- Bulk API limitations in self-hosted serv...
Environment: Appwrite Selfhost SDK: node-appwrite 28.0 Calling `upsertRows` (also applies to `createRows`/`updateRows`/`deleteRows`) with more than 100 rows fa...
- Self Hosted GitHub connection not adding...
After upgrading to 1.9.6 i noticed that i cannot search for new repositories when trying to add new functions. I removed the existing github connection via Set...