# snap_getClientStatus

> Reference documentation for the `snap_getClientStatus` method of the Snaps API.

<SnapsAPIReference method={{"name":"snap_getClientStatus","description":"Get the status of the client running the Snap.","parameters":null,"result":{"kind":"object","type":"{ clientVersion: string; platformVersion: string; locked: boolean; active: boolean }","description":"An object containing information about the client that the Snap is running\nin.","required":false,"properties":[{"kind":"primitive","type":"string","description":"The semantic version of the client that the Snap is running in.","name":"clientVersion"},{"kind":"primitive","type":"string","description":"The Snaps platform version that the client is running.","name":"platformVersion"},{"kind":"primitive","type":"boolean","description":"A boolean flag that indicates whether the client is locked or not.","name":"locked"},{"kind":"primitive","type":"boolean","description":"A boolean flag that indicates whether the client is active or not. The\nclient is considered active if the client is visible.","name":"active"}]},"subjectTypes":["snap"],"examples":[{"examples":[{"language":"ts","content":"import type { OnCronjobHandler } from '@metamask/snaps-sdk'\nimport { MethodNotFoundError } from '@metamask/snaps-sdk'\n\nexport const onCronjob: OnCronjobHandler = async ({ request }) => {\n  switch (request.method) {\n    case 'execute':\n      // Find out if MetaMask is locked.\n      const { locked } = await snap.request({\n        method: 'snap_getClientStatus',\n      })\n\n      if (!locked) {\n        // Do something that requires MetaMask to be unlocked, such as\n        // accessing the encrypted state.\n      }\n\n    default:\n      throw new MethodNotFoundError()\n  }\n}\n"}]}],"restricted":false}}  />
