> For the complete documentation index, see [llms.txt](https://tutorial.neoline.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tutorial.neoline.io/reference/neo3-provider-api-legacy/read-methods/getstorage.md).

# getStorage

Reads the raw value in smart contract storage.

## **Input Arguments**

<table><thead><tr><th width="297">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>scriptHash: string</code></td><td>Script hash of the smart contract to invoke a read on</td></tr><tr><td><code>key: string</code></td><td>Key of the storage value to retrieve from the contract</td></tr></tbody></table>

## **Success Response**

<table><thead><tr><th width="305">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>result: string</code></td><td>The raw value that's stored in the contract</td></tr></tbody></table>

## **Error Response**

<table><thead><tr><th width="303">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>type: string</code></td><td>The type of error which has occured</td></tr><tr><td><code>description: string</code></td><td>A description of the error which has occured</td></tr><tr><td><code>data: string</code></td><td>Any raw data associated with the error</td></tr></tbody></table>

## Example

### Request

```js
neolineN3.getStorage({
    scriptHash: '006b26dd0d2aa076b11082847a094772450f05af',
    key: 'token0',
})
.then(result => {
    const value = result;
    console.log('Storage value: ' + value.result);
})
.catch((error) => {
    const {type, description, data} = error;
    switch(type) {
        case 'NO_PROVIDER':
            console.log('No provider available.');
            break;
        case 'CONNECTION_REFUSED':
            console.log('Connection dApp not connected. Please call the "connect" function.');
            break;
        case 'RPC_ERROR':
            console.log('There was an error when broadcasting this transaction to the network.');
            break;
        default:
            // Not an expected error object.  Just write the error to the console.
            console.error(error);
            break;
    }
});
```

### Response

```js
{
    result: 'wYCMqLCTIUiax57E8Zd/O9xN3l8='
}
```
