When executing
await _repository.teams.createMembership(
teamId: event.listId,
roles: ['member'],
email: event.email,
url: 'xxxx',
);
I see this in the appwrite container logs:
[0] /usr/src/code/vendor/utopia-php/framework/src/Http/Http.php : 813 -> validate()
[1] /usr/src/code/vendor/utopia-php/framework/src/Http/Http.php : 674 -> getArguments()
[2] /usr/src/code/vendor/utopia-php/framework/src/Http/Http.php : 976 -> execute()
[3] /usr/src/code/vendor/utopia-php/framework/src/Http/Http.php : 857 -> runInternal()
[4] /usr/src/code/app/http.php : 551 -> run()
[5] [internal function] : -> {closure:/usr/src/code/app/http.php:513}()
Appwrite: 1.9.0 Flutter: 3.41.2
I have custom SMTP setup for the project and I was actually able to receive a few emails before it stopped working, and I haven't made a change to my code in any way.
I even removed all my functions as some of them had triggers on teams.create but still the same.
Is there any way to see more detailed logs?
Also attaching my appwrite doctor screenshot as it has some things that don't look right to me, but the console works and everything else seems to function.
have you tried making membership via console? does it work there?
Yes I can create it manually but I need programatic create and invite
interesting, narrows down the problem. seems like some validation logic is failing
one more test, can u try using some other sdk / direct curl call? this will isolate issue is in sdk or the api itself
When trying to execute the request via curl I get:
{
"message": "Param \"roles\" is not optional.",
"code": 400,
"type": "general_argument_invalid",
"version": "1.9.0"
}
And this is how my curl request looks like:
curl -X POST https://appwrite.XXXX/v1/teams/XXXXX/memberships \
-H "Content-Type: application/json" \
-H "X-Appwrite-Response-Format: 1.9.0" \
-H "X-Appwrite-Project: XXXXX" \
-H "X-Appwrite-JWT: XXXXXXX" \
-d '{
"email": "igor@XXX",
"roles": ["member"],
"url": "https://example.com",
}' -s | jq
might be just a malformed curl request?
I tried converting the one from official docs, if you can spot anything wrong with it do let me know
try something like this
curl -X POST https://appwrite.XXXX/v1/teams/XXXXX/memberships
\
-H "Content-Type: application/json"
\
-H "X-Appwrite-Response-Format: 1.9.0"
\
-H "X-Appwrite-Project: XXXXX"
\
-H "X-Appwrite-JWT: XXXXXXX"
\
-d '{
"email": "igor@XXX",
"roles": ["member"],
"url": "https://example.com"
}' -s | jq
that trailing comma makes it invalid json
and hence its not wokring
will fix website docs 👍
After using Postman to generate the request and fixing the trailing comma I think I found what the issue is:
{
"message": "Invalid `url` param: Invalid URI. Register your new client (XXXX) as a new Web platform on your project console dashboard",
"code": 400,
"type": "general_argument_invalid",
"version": "1.9.0"
}
But that info is not visible in sdk logs or anywhere else except this direct API call
I even have Membership res = await _repository.teams.createMembership(...); log(res.toString()) in my code and nothing is logged out.
but if I specify my appwrites url that the email sends, also can the rate limit be increased on this endpoint somehow? Having only 10 req/hour is not good for development and testing.
Also when trying to register this new URL as a platform what option should I pick ? As this url will probably point to a function which will execute the team invite accept logic
Recommended threads
- Bulk API limitations in self-hosted serv...
Environment: Appwrite Selfhost SDK: node-appwrite 28.0 Calling `upsertRows` (also applies to `createRows`/`updateRows`/`deleteRows`) with more than 100 rows fa...
- Self Hosted GitHub connection not adding...
After upgrading to 1.9.6 i noticed that i cannot search for new repositories when trying to add new functions. I removed the existing github connection via Set...
- Getting current user has been blocked
Getting current user has been blocked error while signing in the appwrite console. Got this during I am testing with the my saas web project. Please help to unb...