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
- Invalid query: Query on attribute has gr...
I cannot view the table within the Console
- 1:1 relationship doesn’t sync after re-a...
Hi, I’m trying to use a two-way one-to-one relationship. It works fine when I create a record with the relationship set, and it also works when I unset it. But ...
- Failed to create function
Hey everyone 👋 I'm having an issue creating Functions on Appwrite Cloud and I'm not sure if it's a platform bug or something wrong in my project. When I try t...