# Is Device Connected

## Returns the device online state

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

This API call allows you to get the device online status\
**Example:**\
`https://blynk.cloud/external/api/isHardwareConnected?token=Rps15JICmtRVbFyS_95houlLbm6xIQ2L`

#### Path Parameters

| Name  | Type   | Description       |
| ----- | ------ | ----------------- |
| token | string | Device auth token |

{% tabs %}
{% tab title="200 Returns true or false" %}

```
true
```

{% endtab %}

{% tab title="400 Could not find a device token" %}

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

{% endtab %}
{% endtabs %}

{% hint style="info" %}
You can get the **Device auth token** in [Device info](https://bit.ly/BlynkSimpleAuth).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blynk.io/en/blynk.cloud/device-https-api/is-device-connected.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
