# Get Datastream Value

## Get Datastream value

<mark style="color:blue;">`GET`</mark> `https://{server_address}/external/api/get?token={token}&{pin}`

This endpoint allows you to get the stored value of the Datastream by pin type and pin.\
**Example:**\
`https://blynk.cloud/external/api/get?token=Rps15JICmtRVbFyS_95houlLbm6xIQ2L&v1`

#### Path Parameters

| Name  | Type   | Description                                |
| ----- | ------ | ------------------------------------------ |
| pin   | string | Virtual pin number (should start with "v") |
| token | string | Device auth token                          |

{% tabs %}
{% tab title="200 Value successfully retrieved." %}

```
100.00000
```

{% endtab %}

{% tab title="400 Could not find a device token
or
Wrong pin format" %}

```
{"error":{"message":"Invalid token."}}

or

{"error":{"message":"Wrong pin format."}}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
You can get the **Device auth token** in [Device info](https://docs.blynk.io/en/~/revisions/ynmC8lZ6FPocTYWigjcO/getting-started/activating-devices/manual-device-activation#step-3-getting-auth-token).
{% endhint %}

## Get Datastream value by Datastream ID

<mark style="color:blue;">`GET`</mark> `https://{server_address}/external/api/get?token={token}&dataStreamId={id}`

This endpoint allows you to get the stored value of the Datastream by id.\
**Example:**\
`https://blynk.cloud/external/api/get?token=Rps15JICmtRVbFyS_95houlLbm6xIQ2L&dataStreamId=1`

#### Path Parameters

| Name         | Type    | Description       |
| ------------ | ------- | ----------------- |
| dataStreamId | integer | Datastream Id     |
| token        | string  | Device auth token |

{% tabs %}
{% tab title="200 Value successfully retrieved." %}

```
100.00000
```

{% endtab %}

{% tab title="400 Could not find a device token
or
Typo in dataStreamID
or
Requested dataStream doesn't exist in the product ESP32 QA" %}

```
{"error":{"message":"Invalid token."}}

or

{"error":{"message":"Wrong pin format."}}

or

{"error":{"message":"Requested dataStream doesn't exist in the product ESP32 QA"}}
```

{% endtab %}
{% endtabs %}
