Trying to user teams.createMembership (appwrite.js), I am trying to send an invite to my gmail but it is failing stating the email is invalid
AppwriteException: Invalid email: Value must be a valid email address
[Error] Method: POST
[Error] URL: /v1/teams/:teamId/memberships
[Error] Type: Utopia\Exception
[Error] Message: Invalid email: Value must be a valid email address
[Error] File: /usr/src/code/vendor/utopia-php/framework/src/App.php
[Error] Line: 742```
My Code:
```.teams.createMembership('client', 'ezekielj221@gmail.com', roles, `${Server.baseURL}/invite/${companyId}?tkn=${authToken}`)```
the email is 100% a valid email, any insight on this?
- what sdk?
- what sdk version?
- what appwrite version?
appwrite.js "appwrite": "^11.0.0", 1.4.0
look at the function signature: https://github.com/appwrite/sdk-for-web/blob/7b37a2bec1dbe47b55e2c962996046f56b763192/src/services/teams.ts#L233
okay, order is different than what is in the docs https://appwrite.io/docs/client/teams?sdk=web-default&v=cloud#teamsCreateMembership
that helps, thank you!
@Steven new issue, It is telling me the team id does not exist:
AppwriteException: Team with the requested ID could not be found.
POST https://[REDACTED]/v1/teams/client/memberships 404
is the user in the team? is the user an owner in the team? Probably not considering that members count is 0 👀
derp. thanks
Okay, I am in the team now, how to i give myself permissions to send invitations?
The member needs to have role owner
ugh, i set it to "Owner" with a capital O.
as always. thanks for your help Steven
Recommended threads
- Rate límit reset
I've made an error in the code by not setting a limit on how much rows should i get per request because i was working with a small db for testing. Last night Iv...
- How to set permissions using the createO...
Hi, I'm trying to create a set of registers in a table using the tableDB.createOperations function, but it seems like it doesnt support/expect the usage of the ...
- Fulltext index creation fails due to Inn...
I'm running a self-hosted Appwrite 1.8.1 instance and encountering an issue when creating fulltext indexes on a collection. **The Problem:** Fulltext index cre...