An error occurred: app.66b0ff530019305177ae@service.cloud.appwrite.io (role: applications) missing
- 0
- Cloud
When creating jwt token I get this error
An error occurred: app.66b0ff530019305177ae@service.cloud.appwrite.io (role: applications) missing scope (account)
Here's my code.
try { $session = $account->createEmailPasswordSession($email, $password); $jwt = $account->createJWT();
return $context->res->json([
'status' => 'success',
'session' => $session,
'jwt' => $jwt
]);
} catch (Exception $e) {
$context->log('General Exception: ' . $e->getMessage());
return $context->res->json([
'status' => 'error',
'message' => 'An error occurred: ' . $e->getMessage()
]);
}
Session gets created successfully but jwt token returns the above error
Did you set an API key?
Yes I did. Everything was working perfectly until I add this line $jwt = $account->createJWT();
If I comment it out my code works without any issue
Try removing the API key
(Unless there are other places in your code you need it?)
Recommended threads
- Console cloud is down
As attached I can not login to console and it affected to our services that uses Appwrite <#1102936099745177700> <#564160731327758347>
- Failed sending to target <Email> with er...
Hi! I got this problem and trying to test the resend smtp server. But when I use messaging feature within the console it says. ```Failed sending to target <Ema...
- Hi Folks, Database Writing Issue
Hey Folks im trying to get logging setup on my website but im getting an error, i dont have any document id and i think this is the issue but i havent got the f...