Skip to content
Back

how to access the value of account status

  • 0
  • Self Hosted
  • Auth
  • Web
  • Cloud
RoxGame
18 May, 2026, 02:50
TL;DR
You can access the account status by checking user status and email verification properties using the provided code snippet. The status can be 'blocked', 'verified', or 'unverified'. There is no built-in property/command to directly return these status values, so they need to be derived explicitly.
Ibaraki Douji
18 May, 2026, 08:34

Could you explain a bit more what your trying to do ?

is it like access the status from the server SDK ? access the reason why it's blocked ? or maybe somthing else ?

RoxGame
18 May, 2026, 13:24

i just need to access that status string from server: blocked or verified or unverified that it

Devika
18 May, 2026, 13:37

Can you try doing something like this? -

TypeScript
const user = await users.get(userId);

console.log(user.status);
console.log(user.emailVerification);

let accountStatus = "";

if (!user.status) {
  accountStatus = "blocked";
} else if (user.emailVerification) {
  accountStatus = "verified";
} else {
  accountStatus = "unverified";
}

console.log(accountStatus);
Devika
18 May, 2026, 13:39

You can see various users properties available here - https://appwrite.io/docs/references/cloud/models/user

RoxGame
18 May, 2026, 13:51

Thank you

Devika
18 May, 2026, 13:51

Mention not ๐Ÿ‘

RoxGame
18 May, 2026, 13:51

How is there is command for that

RoxGame
18 May, 2026, 13:53

<@1329045306997866509>

Devika
18 May, 2026, 13:59

In my opinion, there isn't any built in property/command which directly returns status like "blocked", "verified", etc. It's neither mentioned in the docs, so you need to derive it explicitly

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more