createMembership from Client, accepted parameters are misplaced or am i doing something wrong?
- 0
- Self Hosted
- Web

Hey folks,
while createMembership from client the accepted parameters are
<TEAM_ID>', // teamId
[], // roles
'email@example.com', // email (optional)
'<USER_ID>', // userId (optional)
'+12065550100', // phone (optional)
'https://example.com', // url (optional)
'<NAME>' // name (optional)
docs also say if invited by email it will send an email so that would require teamId, roles, email, url
but whenever I am passing 4 of these it throws errors since the places for these parameters are not same as defined in types.
const result = await teams.createMembership(
userTeam.$id,
[], // roles
userEmail,
'https://my-redirect-url.com'
);
error: Invalid userId param: UID must contain at most 36 chars.
because of the sequence of required parameteres, it does say optional but doesn't with above code.
any help would be appreaciated.
best, Sikandar
Recommended threads
- I am facing this error: type 'Null' is ...
When attempting to fetch areas from the area collection, the application throws an error: "type 'Null' is not a subtype of type 'int.'" This issue originates in...
- Adding Domain to Sites [Self Hosted]
I am struggling to get this working. I stood-up a new server and deployed appwrite 1.7.4. I added update .env file _APP_DOMAIN=appwrite.mydomain.com _APP_DOMAI...
- Adding custom domain to Appwrite project
My app is hosted on Vercel on domain todo.velleb.com. On PC, the OAuth logins like GitHub, Discord and Google work and create the account and log in. On mobile ...
