Florian VatesOriginal post
Apple Developer
I understand that when creating a team with a function, the user that made the request will not be the owner so I think I have to add the user that did the request as a member. However, I’m getting an error „Missing required parameter: "roles"
at Teams.createMembership"
Do you see anything I’m doing wrong?
According to the documentation, the parameters are passed in correctly
https://appwrite.io/docs/references/cloud/server-nodejs/teams#createMembership
Summary
Issue: Error "Missing required parameter: 'roles' at Teams.createMembership" when trying to add the user that made the request as a member with a specific function while creating a team.
Solution: The error is occurring because the 'roles' parameter is missing in the code. Make sure to include the necessary 'roles' parameter when creating the membership. Double-check the documentation and ensure all required parameters are being passed correctly in the Teams.createMembership method.