Team viewer API error - Code parameter missing error

Hi,

We get below error during using the token api. Authorize API does not give the details about code. Can you please help to find the Code to use in token api? Please suggest. Thank you!

POST Request - https://webapi.teamviewer.com/api/v1/oauth2/token

Body

{

    "grant_type":"authorization_code",

    "code":"",

    "redirect_uri": "www.google.com",

    "client_id": "661593-ZVlILwbw5c9wWRwAqrDb",

    "client_secret": "uGgK2sclwrQxofu6Ia9c"

}

Response -

{

    "error": "invalid_request",

    "error_description": "code or client_id parameters missing",

    "error_code": 1

}


GET - https://login.teamviewer.com/oauth2/authorize?response_type=code&client_id=661593-ZVlILwbw5c9wWRwAqrDb&redirect_uri==https%3A% 2F%2Fclient%2Eexample%2Ecom%2Fcb

Response-

<!DOCTYPE html>

<html>


<head>

    <meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=EDGE" />

    <meta name="viewport" content="initial-scale=1, maximum-scale=1" />




    <!--revision=15.52.1.0 -->


    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />


    <link rel="stylesheet" type="text/css" href="/Content/logon.css?v=15.52.1.0" />


    <title>TeamViewer Management Console</title>

</head>


<body>

    <div class="messagePositionerMain">

        <span id="outdatedBrowserMessage"></span>

        <span class="messagePositionerLogon"></span>

    </div>




    <div id="portal-root"></div>

    <div id="react-root"></div>



    <script src="/Scripts/unbundled/consoleUrl.min.js?rev=15.52.1.0"

        integrity="sha512-DZXeMBjsY5kt8DaqV5Jql9gC1lfnJLM/pdlFGemZcZHUy/Op7+wpNA/I9IFovEwNB6gQAjZLHoTvQNg6/k4TCA=="

        crossorigin="anonymous"></script>


    <script type="text/javascript" src="/Scripts/translations/tl-en.js?v=15.52.1.0" integrity=""

        crossorigin="anonymous"></script>

    <script type="text/javascript" src="/Scripts/bundles/logon.libs.js?v=MVbcEtW5ERmL"

        integrity="sha512-MVbcEtW5ERmLSvmvrTh/HXKWaNzYwJQwBMf7FTCUOaxKMpfXqatnMgUI/F/VzqsSEtJPR/JlZu74xj2cP252dw=="

        crossorigin="anonymous"></script>






    <script src="/logon/config.js?rev=15.52.1.0"></script>



    <script defer async src="//wsp.teamviewer.com/Scripts/wsp.js?_=638466281164606973"></script>


    <script type="text/javascript" src="/Scripts/bundles/logonV2.compiled.js?v=15.52.1.0"

        integrity="sha512-uij7LMI4zycrzVweyGtmTB0m6euttXIFL5xCnPpaRWwUt7ZqQaa7TGmoVbIvdHHW0Tr15X6ifvoSRk8rSpcp2g=="

        crossorigin="anonymous"></script>

    <script type="text/javascript" src="/Scripts/bundles/onetrustConsent.compiled.js?v=15.52.1.0" integrity=""

        crossorigin="anonymous"></script>


    <script type="text/javascript">

        function OptanonWrapper() { }

    </script>


</body>


</html>