Charles Web Debugging Proxy

Charles Proxy is a HTTP/HTTPS traffic viewer by which you can view the traffic between your device and the internet. Since the MoPub SDK uses HTTP/HTTPS to request and receive ads, Charles can be used to see what is happening for debugging and testing apps ad request/response.

Install and Register Charles Proxy

  1. Download Charles Proxy here.
  2. On the Charles menu bar, go to Help > Register Charles…. You can also use a trial version with some limitations.

Setup Proxy

  1. Open Charles

    The first time you launch Charles, you will be asked to grant privileges to change your Network Settings. Click “Grant Privileges” and enter your password when prompted.

  2. Enable Proxy ( Proxy > Proxy Settings… > Proxies )

    Enable Proxy Screenshot

  3. Enable SSL Proxying ( SSL Proxy Settings… )

    Add a wildcard host to enable all SSL:

    Enable SSL Proxying Screenshot

    Or explicitly add MoPub host to the list:

     Host: *
     Port: *
  4. Add MoPub host to Focussed Hosts ( View > Focussed Hosts… > Add )

    Add Focussed Hosts Screenshot

Connect Your Devices


  1. Go to Settings > WiFi and connect to the network your computer is connected to

  2. Long press the network until the modal appears, then click Modify Network. Select Advanced Options to reveal proxying options. Configure the following:

     Proxy: Manual
     Proxy hostname: [Your computer's IP Address]
     Port: 8888


  1. Go to Settings > WiFi and connect to the network your computer is connected to
  2. Select “i” next to the network, and scroll down to HTTP Proxy and select Manual. Configure the following:

     Server: [Your computer's IP Address]
     Port: 8888

You should see a prompt when your device successfully connect to your computer, press Allow to complete the connection.

Install SSL Certification on Your Devices

  1. Go to Help > SSL Proxying > Install Charles Root Certificate on a Mobile Device…

  2. On your Android or iOS device, follow the instruction to browse to to download and install the certificate.

  3. Navigate to Settings > General > Profile & Device Management to install and verify the Charles SSL certificate.

  4. Navigate to Settings > General > About > Certificate Trust Settings to mark the Charles Root certificate as trusted.


On Android 7+ :

If Charles is not able to decrypt https traffic, please follow this insturction to add a network_security_config.xml and modify your AndroidManifest.xml in your app.

            <certificates src="system"/>
            <certificates src="user"/>

Note: please remember to revert this before your app goes live.

On iOS 10.3+ :

You have to go to Settings > General > About > Certificate Trust Settings to toggle the full trust of the certificate.

Test and View MoPub Ad Requests/Responses

  1. Launch MoPub Sample App or your own apps that has integrated MoPub SDK.

  2. Go to Charles Files > New Session to start a new recording if need be.

  3. Click on the besom icon to clear the logs, and make sure to enable the recording.

    ![Clear and Record][9]

  4. Trigger ad requests and reproduce any issues you’ve encountered.

  5. You should start seeing the ad requests and responses decrypted as below:

    Ad requests and Responses Screenshot

  6. Click Focused or type ‘mopub’ into the Filter to filter out the traffic that are sent through the MoPub server.


    Below will be exposed in the Charles log if ad requests to MoPub were captured:

    • MoPub ad request:
    • MoPub attempt tracker:
    • MoPub impression tracker:
      • (for Marketplace only)
    • MoPub click tracker:
      • (for Marketplace only)
    • MoPub app opened tracker:
  7. Disable the recording.

Save and Send Session Logs

  1. Ensure your session logs are decrypted.
  2. Recorded sessions can be saved as .chls files, or exported as HTTP Archive (HAR) logs from File > Export Session…
  3. Send the files to your account manager.


Why can’t I see any traffic recorded in Charles?

  • Ensure your Charles Recording toggle is on.
  • Confirm if your mobile and your computer are connecting to the same WiFi.
  • Confirm if the proxy IP is identical with your computer’s IP.
  • Restart your Charles tool on your computer, and reconnect your devices to the WiFi.
  • Disable any VPN on your mobile.

Why is my https logs are encrypted?

  • Ensure your SSL Proxying is enabled and already allowlisting correct host name.
  • Redo the steps in the secton: “Install SSL Certification on Your Devices”.
  • Restart your Charles tool on your computer, and reconnect your devices to the WiFi.

s/ [8]: /assets/images/tools/Charles-050.png [9]: /assets/images/tools/Charles-060.png

Last updated August 28, 2021

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2021 MoPub (a division of Twitter, Inc.)