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
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...
- 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...