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
- custom domain with CloudFlare
Hi all, it seems that CloudFlare has blocked cross-domain CNAME link which made my app hostname which is in CloudFlare, unable to create a CNAME pointing to clo...
- Custom emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...