Learn from experts and connect with global tech leaders at POST/CON 24. Register by March 26 to save 30%.

Learn more →
X

Using Postman Proxy to Capture and Inspect API Calls from iOS or Android Devices

Avatar

In this tutorial, I will guide you on how you can use Postman’s proxy feature to inspect HTTP communication going out from your phone. All you need to get started is your computer and mobile connected to the same local wireless network.

Step 1: Open Proxy Settings in Postman Mac App

postman-proxy-settings-button

postman-proxy-settings

Keep a note of the port mentioned in the Proxy Settings. In my case, I am keeping it to the default port 5555. As a start you should set the target in the proxy dialog box to “History.” This will cause all your requests to be captured and stored in the History sidebar panel.

Step 2: Take a note of your computer’s IP address

osx-network-settings

On OSX, it is inside System Preferences > Network. In my case, the IP address of my Macbook is 192.168.0.101.

Step 3: Configure HTTP Proxy on your mobile device

Open Wireless Settings of your mobile device and update the configuration of the wireless connection to use HTTP Proxy. Set the IP address to your computer’s IP you found in second step and the port from what you set in Postman in first step.

ios-http-proxy-settings

I am using an iPhone and I set the proxy IP address to 192.168.0.101 and port 5555.

You are all set!

Now head over to your app or browser and you will notice the network calls listed in your Postman App’s history sidebar. In the following screenshot, you will notice that I opened www.postman.com from Safari on my iPhone and I could see all the requests made by the browser in my Postman sidebar!

postman-proxy-history-sidebar

If you want to discuss more about Postman Proxy—how it works or what more you can do with it, join our Postman Community.

Tags:

Comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

45 thoughts on “Using Postman Proxy to Capture and Inspect API Calls from iOS or Android Devices

  • Avatar

    Unable to see proxy settings button in postman mac app.. https://uploads.disquscdn.com/images/316afb977c82a8ea267c4661f5c59d7a560b3d75169886c2efe8aac4cca4bcb7.png

    Any help please?

    • Avatar

      Currently only available in canary channel of osx only. 🙁
      https://www.postman.com/app/postman-osx?channel=canary

      • Avatar

        Thanks Yajnesh

    • Avatar

      from your screenshot, that looks like a Chrome App, the Map App does not have Inspector icon at the top bar.

  • Avatar

    This is really cool.. It works for me.

  • Avatar

    Sounds just like Fiddler. What are the advantages / use cases for this over using Fiddler?

    • Avatar

      I would usually use this to add the listed requests into useful collections, write tests in them and re use later for testing. Then I would access the collection via postman API and run it on command line using Newman in CI system for the project.

      • Avatar

        Great answer, that would make things smoother.

  • Avatar

    This is awesome stuff! Thanks for the simple blog on how-to on this topic.

  • Avatar

    How about SSL / HTTPS ?

  • Avatar

    I am able to capture requests just fine.

    Does anyone know a way to capture all the responses at the same time?

    I want use the API (from the App) and collect all the responses in a single collection but it seems you have to go back and fire off each request in order to view a response?

  • Avatar

    are the responses logged any where?

  • Avatar

    My interceptor icon looks more like ISS rather than radar and it only opens little popup with on and off toggle: http://i.imgur.com/7yK3N5n.png
    My version is 4.4.3: http://i.imgur.com/sB6pxOu.png
    Maybe that’s the problem? But I can’t find any update button.
    Do you know what’s going on?

  • Avatar

    good for testing the performance of APIs for android app

  • Avatar

    Hi shamasis ,

    Thanks for sharing this blog with screenshots. it’s really helpful to me.

  • Avatar

    Hi Fahed,

    I’m afraid our apps only run on MacOS, Windows, Linux, and ChromeOS.

  • Avatar

    Followed the steps but not able to capture requests.

  • Avatar

    Thanks for sharing this blog with screenshots. it’s really helpful. i am able to connect HTTP request .not able to connect HTTPS request. Is it possible to track https request ?

  • Avatar

    thanks

  • Avatar

    An additional chapter for the iOS Simulator setup would be nice.

  • Avatar

    Hi tried this but i am getting “This connection is Not Private” error and does not get me any response. How can I overcome this?

    • Avatar

      Also there is a certificate that was not trusted. Cert name : Internet Widgits Pty Ltd

  • Avatar

    On Android TV set top box, after the apk is installed, it runs on the set top box. My question is how to use Postman for APIs testing in that kind of environment?

  • Avatar

    support https?

  • Avatar

    Hi this article was really insightful.

  • Avatar

    it is only working with browsers. how to make this work with iPhone apps as well?

  • Avatar

    How we can capture the api calls from iOS & Android simulator

  • Avatar

    Hi, seems quite late here… i have tried this on iOS device and worked as explained here i could capture all the request from an app that i tested but not for Android, the app i tested is like blocked from the connection after setting up the proxy on the device, any suggestion?

  • Avatar

    Can I Capture the API call of mobile application working on VPN?

  • Avatar

    I can’t install the SSL Certificate on Android as it keeps asking me for a private key. It seems like Android 11 requires a CA:True flag that the certificate that postman is generating does not include as of now: https://android.stackexchange.com/questions/237141/how-to-get-android-11-to-trust-a-user-root-ca-without-a-private-key

    Will there be a Fix for this issue from Postman side?

  • Avatar

    Good info, you could please cover about connecting from emulator and the correct settings, the above setting when we do on emulator on Android on Mac does not work.

  • Avatar

    I did this. Got some of the API call but there were no major API like login or logout API being called instead app was throwing Internet connection lost.
    I just want to confirm if this is used for apps which are pointed to localhost. Right? Otherwise it will be a security breach for the apps as we can see all requests and response for an API call.

  • Avatar

    I’ve carefully followed all the steps. It doesn’t work for me. Once I enable proxy, there is no internet connection.

  • Avatar

    Have a problem when on proxy on my phone it lost internet connection. How can i access internet while using proxy

  • Avatar

    I’ve tried to setup the same but i’m losing my internet connection in my iOS device. I hope anyone can help on this issue. Thanks!

  • Avatar

    didn’t work for me, once setting the proxy on my iPhone wi-fi i got “no internet connection”
    p.s I’m using the postman proxy tool with my browser using the Interceptor add on successfully..

  • Avatar

    I see only http://connectivitycheck.gstatic.com/generate_204 get requests didn’t work

  • Avatar

    Is there a chance to check API traffic for a Samsumg TV app not mobile devices!!!

  • Avatar

    Commendable insights! This blog brilliantly elucidates the value of utilizing Postman Proxy to capture and scrutinize API calls from both iOS and Android devices. Thanks for sharing.

  • Avatar

    Thank you for providing this blog along with screenshots ; it has proven to be very beneficial for me.