Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found

Use IP geolocation

BrowserStack’s IP geolocation feature allows you to test app behaviour from different locations by using IP addresses hosted in 45+ countries around the world. By incorporating IP geolocation into your tests, you can verify scenarios such as localized pricing, languages, product listings and much more.

With IP geolocation enabled, traffic from your mobile app will originate from an IP address hosted in the country you have chosen. With over 45+ countries to choose from, you can now test how your mobile app behaves across the world.

Note: IP geolocation is an Enterprise plan feature on BrowserStack. Contact sales for details

In order to specify the location, you need to pass the geoLocation parameter in the REST API request to start Espresso test execution. You will be required to pass two letter country code for desired location.

REST API endpoint:

POST /app-automate/espresso/build
Parameter Description Value
geoLocation Test how your app behaves in specific countries <Two letter country code>
Example: CN for China, FR for France, IN for India and US for United States of America

Example cURL request:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/build" \
-d '{"geoLocation": "FR", "devices": ["Samsung Galaxy S8-7.0"], "app": "bs://f7c874f21852ba57957a3fdc33f47514288c4ba4", "testSuite": "bs://e994db8333e32a5863938666c3c3491e778352ff"}' \
-H "Content-Type: application/json"
Note:
  1. Complete list of over 45+ countries
  2. IP geolocation cannot be enabled if allowDeviceMockServer is set to true.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle