
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
- phantom relationships appear on parent c...
i have this bug were my past deleted collection apears as relationship to my parent collection. when i try to delete that relationship from parent it gives me e...
- Attribute stuck on proccessing
i tried creating a new attribute butits stuck on proccessing,i did a hard refresh,cleared cache everything but still stuck on proccessing,also in my functions w...
- Appwrite Cloud Custom Domains Issue
Iām trying to configure my custom domain appwrite.qnarweb.com (CNAME pointing to fra.cloud.appwrite.io with Cloudflare proxy disabled) but encountering a TLS ce...
