The endpoint v1/account/jwts aint working as REST documentation says. It only works using Cookies recived from v1/account/sessions/email. My test commands steps are:
1st. Create Session
curl -sX POST "https://appwrite.mydomain.io/v1/account/sessions/email" \
-H "Content-Type: application/json" \
-H "X-Appwrite-Response-Format: 1.6.0" \
-H "X-Appwrite-Project: project-id" \
-d '{"email": "user@email.com", "password": "1234347"}' \
-c cookie.txt
2nd. Create JWT
curl -sX POST "https://appwrite.mydomain.io/v1/account/jwts" \
-H "Content-Type: application/json" \
-H "X-Appwrite-Project: project-id" \
-b cookie.txt
This works fine. But, i would like to know if i can make this request without cookies, usgin sessionID and UserID from JSON provided from v1/account/sessions/email request.
When I try any other way i get this error:
{
"message": "User (role: guests) missing scope (account)",
"code": 401,
"type": "general_unauthorized_scope",
"version": "1.6.0"
}
I also tried to use the Appwrite Swagger to test, configuring the SessionID, but no success.
Recommended threads
- Running into a server error on my self-h...
Hey everyone, I'm running into a server error on my self-hosted setup after updating to v1.19.0. The issue only happens during user creation and deletion. Ever...
- Storage System
Hey guys, quick question regarding massive storage scaling. I’m working in digital forensics and I’m constantly dealing with huge binary disk images, usually be...
- API key without database.read/write
I had some issues with my previous API key and I deleted it then I wanted to create a new one and discovered the database checkbook has no database.read/write j...