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
- Authentication on custom Websocket Serve...
Hi, I want to use a custom Websocket Server (using Bun) for my application. However I cant really figure out authentication on custom servers. Session cookies ...
- Realtime: Listener not triggered on upda...
I self host appwrite 1.8.1. The genereal functionallity works fine. But my realtime subscription isn't updating. I see "Received heartbeat response from realtim...
- Realtime for files() works almost well, ...
I have been trying to make use of realtime, today (14.03.26) I have pulled all the latest versions of docker images, and sdk available. Whats working: - Conn...