# Network Traffic Monitor

{% hint style="warning" %}
Note by default, a user needs to be authenticated to view network traffic using the built-in intercept proxy. See [App Permissions](https://docs.appetize.io/platform/app-management/app-permissions) for more information.
{% endhint %}

## Capture Network Traffic

To allow Appetize to capture all network events, you need to set the proxy of the device to `intercept`.

### With Query Parameter

Add the `proxy` query parameter to your app or embed URL with `intercept` as value.

```uri
&proxy=intercept
```

See [Query Params Reference](https://docs.appetize.io/platform/query-params-reference#proxy) for more information.

### With JavaScript SDK

Set `proxy` to `intercept` in the configuration e.g.

```typescript
await client.setConfig({
    proxy: "intercept",
    ...
})
```

See [Configuration](https://docs.appetize.io/javascript-sdk/configuration#proxy) for more information.

## Inspecting Network Traffic

### With App Page

The app page provides a simple network log of all the events that took place. You can access this via your app's app link

{% code overflow="wrap" %}

```url
https://appetize.io/app/{appId|buildId|publicKey}?&proxy=intercept
```

{% endcode %}

or by going to your [Apps](https://appetize.io/apps) page, selecting the app you want to inspect, and then clicking `debug` on the latest build or choosing a specific build you would like to debug.

<figure><img src="https://2147444700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJUveBCJfn0GR8-hlqi%2Fuploads%2Fro8Wl5iKd0sBn88Dsnam%2FScreenshot%202025-03-21%20113309.png?alt=media&#x26;token=baf5e694-9eeb-4cd5-85e1-2561b33a03d6" alt=""><figcaption><p>Select <code>Debug</code> for the app or a specific build</p></figcaption></figure>

{% hint style="info" %}
You can also open the network logs in Chrome DevTools if you are running the app in a Chrome Browser by selecting the `Chrome DevTools` button.

Alternatively you can download the HAR file and open it in your favorite Network Monitoring tool.
{% endhint %}

<figure><img src="https://2147444700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJUveBCJfn0GR8-hlqi%2Fuploads%2FxM4mArcXmUM0Lm1KAYHL%2FScreenshot%202025-03-21%20113732.png?alt=media&#x26;token=ae7aedff-ad23-4dc0-80c5-92badbc151fb" alt="Example App Network Event Log"><figcaption><p>Network log tab with associated action buttons for downloading the HAR or opening in Chrome DevTools</p></figcaption></figure>

### With JavaScript SDK

You can listen for all network events via our JavaScript SDK. To easily view them in the browser you can print them to the console or you can store it to file for later analysis

```typescript
session.on('network', (data) => {
    // intercepted network request
    if (data.type === 'request') {
        console.log(`[${data.request.method}]: ${data.request.url}`)
    } 
    
    // intercepted network response
    if (data.type === 'response') {
        console.log(data.response.postData)
    }
})
```

See our JavaScript [API Reference](https://docs.appetize.io/javascript-sdk/api-reference#on-1) for more information.

{% hint style="info" %}
[getNetworkInspectorUrl](https://docs.appetize.io/javascript-sdk/api-reference#getnetworkinspectorurl) provides a direct URL for opening network logs in Chrome DevTools
{% endhint %}

## Troubleshooting

### Certificate Issues

When using Appetize’s **Network Intercept Proxy** to monitor **HTTPS traffic**, your app might encounter certificate errors if it uses certificate pinning. To resolve this, you can either:

1. **Remove the certificate pinning** from the app uploaded to Appetize, or
2. **Add Appetize's proxy's** SHA-256 hash to the list of trusted certificates in the app:

```
RNgAjJJXM4cdpieGhVEqa813muPE2imOWGQpFzwI63E=
```

By doing so, the app will trust the proxy’s certificate and allow secure HTTPS traffic monitoring.

{% hint style="warning" %}
If your app uses third-party libraries that also make HTTPS requests, those libraries might not be aware of the SHA-256 hash you add. In such cases, you may need to update the library’s certificate pinning or trust settings as well.
{% endhint %}

> **Note:**&#x20;


---

# 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.appetize.io/features/network-traffic-monitor.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.
