> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# my.getStorageSync

> Retrieve data from local cache synchronously.

Synchronous version of `my.getStorage`.

## Parameters

| Property | Type   | Required | Description            |
| -------- | ------ | -------- | ---------------------- |
| key      | String | Yes      | Storage key identifier |

## Return Value

| Property | Type          | Description                      |
| -------- | ------------- | -------------------------------- |
| data     | Object/String | Corresponding content of the key |

## Code Example

```javascript theme={null}
const data = my.getStorageSync({ key: 'token' });
if (data) {
  console.log('Token:', data.data);
}
```

## Related APIs

<CardGroup cols={2}>
  <Card title="my.getStorage" icon="download" href="/jsapi/storage/my.getStorage">
    Get data asynchronously
  </Card>

  <Card title="my.setStorageSync" icon="bolt" href="/jsapi/storage/my.setStorageSync">
    Store data synchronously
  </Card>
</CardGroup>
