Back

Creating Team Memberships in Appwrite for a Multivendor Application

  • 0
  • Teams
  • Databases
  • Web
  • Self Hosted
anyuru
28 Apr, 2023, 07:41

I'm developing a multivendor application that allows users to create groups and assign different roles to members. I'm using AppWrite's Teams API to manage the groups, but I'm having trouble working with memberships. The documentation doesn't seem to match the actual behaviour of the API. Can you please provide guidance on how to create team memberships using the AppWrite server SDK? I have included screenshots of my function logic and a snippet of the error I'm getting when I try to invoke the function.

TL;DR
User is developing a multivendor application using AppWrite's Teams API for managing groups. They are having trouble creating team memberships and the documentation doesn't match the actual behavior of the API. They asked for guidance on how to create team memberships using the AppWrite server SDK. They later realized that the event payload was passed as a string, not an object, and had to parse it into a JSON object. They managed to get the membership functionality to work. No solution provided.
anyuru
28 Apr, 2023, 08:51

Sorry guys. While digging up I realised that the event payload is passed as a string not an object. Therefore I had to first parse it into a JSON object then use the values in the json string. The team API works fine. Finally got the membership functional.

anyuru
28 Apr, 2023, 09:10

It worked but in the documentation it is saying that the email option is not optional when creating a team if argument is passed as an empty string. There is need to fix this in the documentation.

anyuru
28 Apr, 2023, 09:11

I'll raise an issue

anyuru
28 Apr, 2023, 10:03

How can I raise it anyway

Drake
28 Apr, 2023, 17:18

Creating Team Memberships in Appwrite for a Multivendor Application

Drake
28 Apr, 2023, 17:20

You can create an issue on GitHub: https://github.com/appwrite/appwrite/issues

However, before you do that, it looks like you're using the SDK and referring to the docs for Appwrite version 1.3.x, but your Appwrite is version 1.2.1

Drake
28 Apr, 2023, 17:20

Please upgrade (https://appwrite.io/docs/upgrade) and try again

anyuru
1 May, 2023, 12:06

Thanks.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more