# Get Device Metadata Value

You can get the value of any single-value (text, number, email, hostspot, device name, list, int, imei, image, iccid, device owner email) device meta field using it **exact name** (case sensitive).

**loc.latlon** is special hardcoded internal meta field to get device location "lat lon".

## Get Device Metafield Value

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

This endpoint allows you to get the device metaField value by its id.\
**Example:**\
`https://blynk.cloud/external/api/device/meta?token=Rps15JICmtRVbFyS_95houlLbm6xIQ2L&metaFieldId=1`

#### Path Parameters

| Name        | Type   | Description       |
| ----------- | ------ | ----------------- |
| metaFieldId | string | MetaField id.     |
| token       | string | Device auth token |

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

```
{"type":"Text","value":"device value"}
```

{% endtab %}

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

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

or

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

or

{"error":{"message":"MetaField doesn't exist."}}
```

{% 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 %}
