'Getting 403 error on launching the application in webdriverio

I am trying to launch the url of one the intranet application using webdriverio. Also after providing the proxy details inside capabilities section under wdio.conf.js I am still getting 403 issue.

 capabilities: [{
    browserName: argv.browser,
    proxy: {
        proxyType: 'manual',
        httpProxy: 'proxy addres',
        socksUsername: "username",
        socksPassword: "password",
    },
    'ms:edgeOptions': {
        args: browserArgs
      },
    'goog:chromeOptions': {
        args: browserArgs,
        'useAutomationExtension': 'false',
        'excludeSwitches': ['enable-automation']
    },
    acceptInsecureCerts: true
}]

I am using below browser arguments but nothing worked

let browserArgs = ['--no-sandbox','--start-maximized',
            '--disable-dev-shm-usage', '--disable-blink-features', '--disable-blink-features=AutomationControlled' ]


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source