I am trying to get teams to work, however when I try and invite a user to my team by just supplying a email and name, I get this error?
AppwriteException: Invalid userId param: UID must contain at most 36 chars. Valid chars are a-z, A-Z, 0-9, and underscore. Can't start with a leading underscore
This is the code that I am using.
const result = await teams.createMembership(
teamId, // teamId
[roles], // roles
email, // email (optional)
"http://localhost:3000", // url
name // name (optional)
);
Did you look to see what that function expects for the parameters?
yeah, which is why its even weirder. Here is an image of what it expects.
Isn't that different than what you have?
yeah, but if you read on the left, it says I only need to pass in, user ID or email or phone.
Still, order matters for arguments (positional parameters).
You're passing a url for the user id
yeah because I can't pass an empty string, or can I
You can pass undefined
let me give a shot
yeah perfect, didn't know I could pass undefined. Appreciate that
[SOLVED] Cant invite user to team
Recommended threads
- Export, Import or Migration giving this ...
As you can see in yhe screenshot i am not able to export any data or export the data from tables. Also it is affecting the migration from appwrite to appwrite h...
- Project auto-blocked after load testing ...
Hi team 👋 My project has been automatically blocked with the message: "Project is currently blocked — Access to this project is restricted. Contact support if...
- App build crashing with "Internal error"
Hello Appwrite team! 👋 We are trying to deploy a Next.js application on Appwrite Cloud, but our builds are consistently failing. The deployment log successful...