Customize the User-Agent string to bypass gateway restrictions and support third-party OAuth logins.
Customize the User-Agent string sent by your Nativine wrapper to bypass gateway restrictions, support third-party logins (like Google OAuth), and ensure seamless mobile rendering.
A User-Agent (UA) is a string of text that your application sends to the web servers it connects to. It tells the server what browser, operating system, and device type is making the request. By default, Android and iOS WebViews use a generic mobile WebView User-Agent.
| Platform | Recommended User-Agent String |
|---|---|
| Android | Mozilla/5.0 (Linux; Android 13; SM-S918B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36 |
| iOS | Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Mobile/15E148 Safari/604.1 |
Google strictly prohibits OAuth flows inside generic WebViews. Setting a standard Chrome/Safari UA bypasses the "disallowed_useragent" 403 error.
Gateways like Cashfree look for standard mobile browsers before showing Native UPI Intent buttons. A custom UA ensures they render correctly.