> For the complete documentation index, see [llms.txt](https://docs.webtonative.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.webtonative.com/javascript-apis/device-info.md).

# Device Info JavaScript API

{% hint style="info" %}

<pre data-overflow="wrap"><code>You'll need to import the javascript file in your website before starting from this <a data-footnote-ref href="#user-content-fn-1">link</a>.
</code></pre>

{% endhint %}

To Get device info call following function.

{% tabs %}
{% tab title="Plain Javascript" %}

```
WTN.deviceInfo().then(function(value){
  console.log(value)
});

//value for Android 
{
    appId: "com.webtonative.myapp"
    appVersion: "1"
    appVersionCode: 1
    hardware: "OnePlus/OnePlus3/OnePlus3T:9/PKQ1.***203.001/****042108:user/release-keys"
    installationId: "d29c4372-****-427b-bbc2-******d549da"
    installationType: "debug"
    language: "en"
    model: "OnePlus ONEPLUS A3003"
    operator: "Jio 4G"
    os: "Android"
    osVersion: "9"
    platform: "android"
    timeZone: "Asia/Kolkata"
}

//value for iOS 
{
    appId: "com.webtonative.com",
    appVersion: "1",
    appVersionCode: "1.1",
    installationId: "C6A*****-D*69-4**E-8**2-76*****B8B2C",
    language: "en",
    model: "Testing iPhone",
    os: "iOS",
    osVersion: "15.1",
    platform: "ios",
    timeZone: "Asia/Kolkata"
}
```

{% endtab %}

{% tab title="npm" %}

```
import { deviceInfo } from "webtonative"

deviceInfo().then((value) => {
  console.log(value)
});

//value for Android 
{
    appId: "com.webtonative.myapp"
    appVersion: "1"
    appVersionCode: 1
    hardware: "OnePlus/OnePlus3/OnePlus3T:9/PKQ1.***203.001/****042108:user/release-keys"
    installationId: "d29c4372-****-427b-bbc2-******d549da"
    installationType: "debug"
    language: "en"
    model: "OnePlus ONEPLUS A3003"
    operator: "Jio 4G"
    os: "Android"
    osVersion: "9"
    platform: "android"
    timeZone: "Asia/Kolkata"
}

//value for iOS 
{
    appId: "com.webtonative.com",
    appVersion: "1",
    appVersionCode: "1.1",
    installationId: "C6A*****-D*69-4**E-8**2-76*****B8B2C",
    language: "en",
    model: "Testing iPhone",
    os: "iOS",
    osVersion: "15.1",
    platform: "ios",
    timeZone: "Asia/Kolkata"
}
```

{% endtab %}
{% endtabs %}

[^1]: <https://docs.webtonative.com/javascript-apis/getting-started>
