'Coinbase API returns Cloudflare captcha check and fails to execute [closed]

After a year of my server working perfectly fine, since last week, I am no longer able to successfully hit the Coinbase API, even though no code has been changed on my side whatsoever. The response I'm currently getting from all calls, is a HTML page, asking me to complete a captcha. This is of course not possible, so I was hoping if anyone could tell me how to let the API know my calls are genuine.

Anytime I call the list transactions endpoint for example GET https://api.coinbase.com/v2/accounts/:account_id/transactions, this is the response I get:

<!DOCTYPE html>

<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!-->

<html class="no-js" lang="en-US">
<!--<![endif]-->

<head>

    <title>Please Wait... | Cloudflare</title>

    <meta name="captcha-bypass" id="captcha-bypass" />
    <meta charset="UTF-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <meta name="robots" content="noindex, nofollow" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css"
        media="screen,projection" />
    <!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]-->
    <style type="text/css">
        body {
            margin: 0;
            padding: 0
        }
    </style>


    <!--[if gte IE 10]><!-->
    <script>
        if (!navigator.cookieEnabled) {
    window.addEventListener('DOMContentLoaded', function () {
      var cookieEl = document.getElementById('cookie-alert');
      cookieEl.style.display = 'block';
    })
  }
    </script>
    <!--<![endif]-->



    <script type="text/javascript">
        //<![CDATA[
    (function(){
      window._cf_chl_opt={
        cvId: "2",
        cType: "managed",
        cNounce: "17494",
        cRay: "6ef7c0529ad19570",
        cHash: "993127dea6d4a42",
        cUPMDTk: "\/v2\/user?&limit=100&__cf_chl_tk=ENzk.33NJDLNBYWzHfXIXyRNVTr2GSNptuhagA9Wgw0-1647876861-0-gaNycGzNB_0",
        cFPWv: "b",
        cTTimeMs: "1000",
        cLt: "n",
        cRq: {
          ru: "aHR0cHM6Ly9hcGkuY29pbmJhc2UuY29tLy92Mi91c2VyPyZsaW1pdD0xMDA=",
          ra: "YXhpb3MvMC4xNy4x",
          rm: "R0VU",
          d: "q2gpw3wUesAqkklJbRwZ5iKnexNkqnb56VNvMVoWQB9SNIuL0qjzz2OZUn9bzUrLesXpVbug0gfZVPp7KSueqrKuW3ygg/hNIEvzqfgwGZfvvYq7QvXXifI790ciT/AjYOX7NalXhcL1pBIs/YHNigEG08zzhkhhaxXMV1PVLCClOAmLLMMwWoVGPrf89Sj+Zn26hNdP5M2VaufiKQnbmAd5sk0AclAVFgKE7dALXhPLOmu4pFdEYAnLyah9LzNb6sybNgeVKzGqjnygC7ZWv9ZWneRweLPBAO6WWox6pBfla8KIlKvZb8f5UdZe0Ofo9LG7lpAFNmYpn6SGRMmQeDIqUEDGbR2q/pVKcYBpRlpDCdrL7/Q3nJ9/M34UL1kh6hnXpcrKLQB0rMgsEhrShy+o3ZN+c1Zu22LNcwYcBOASzprlwXIMPxFS35VXtUzpImjgAmHkrI1yLgyMg3AxvqSOtgF29iU0iRah31iLjg9wRBVMiXr45gazyyO2q5CmjFX759gOIcLEdOL8DbwOhAJq+d41Q6BNMTaFbIY0ivly3/R70zHZFFGyzFPknWKNKmKMrdTtQSIyxNDAG6eRkDLWSMyXSg8samDwVMxO9iP0Pocquo/yJO6gCjXsNrE5",
          t: "MTY0Nzg3Njg2MS44NjQwMDA=",
          m: "0Wag3gWELLAplAyr+U68VHPGLi8wHxglclsYp9gHXqw=",
          i1: "+BTRsYVCcAHV9rfnaZexSw==",
          i2: "pPp+nsgRXaj2mTRYW9DqIQ==",
          zh: "gcAsYHC/e1LCLckuTRLI18a2jyXqZLmumNyE/3B9BHQ=",
          uh: "ucU4+zhDdQUaYB73OLep7a3a/S/wsDXG6hga3RWCpb8=",
          hh: "DEnwA/GqE2zOarLhzSj8/arJrL5U8H7OKffhxYHzEKo=",
        }
      };
    }());
    //]]>
    </script>


    <style type="text/css">
        #cf-wrapper #spinner {
            width: 69px;
            margin: auto;
        }

        #cf-wrapper #cf-please-wait {
            text-align: center
        }

        .attribution {
            margin-top: 32px;
        }

        .bubbles {
            background-color: #f58220;
            width: 20px;
            height: 20px;
            margin: 2px;
            border-radius: 100%;
            display: inline-block;
        }

        #cf-wrapper #challenge-form {
            padding-top: 25px;
            padding-bottom: 25px;
        }

        #cf-hcaptcha-container {
            text-align: center;
        }

        #cf-hcaptcha-container iframe {
            display: inline-block;
        }

        @keyframes fader {
            0% {
                opacity: 0.2;
            }

            50% {
                opacity: 1.0;
            }

            100% {
                opacity: 0.2;
            }
        }

        #cf-wrapper #cf-bubbles {
            width: 69px;
        }

        @-webkit-keyframes fader {
            0% {
                opacity: 0.2;
            }

            50% {
                opacity: 1.0;
            }

            100% {
                opacity: 0.2;
            }
        }

        #cf-bubbles>.bubbles {
            animation: fader 1.6s infinite;
        }

        #cf-bubbles>.bubbles:nth-child(2) {
            animation-delay: .2s;
        }

        #cf-bubbles>.bubbles:nth-child(3) {
            animation-delay: .4s;
        }
    </style>
</head>

<body>
    <div id="cf-wrapper">
        <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please
            enable cookies.</div>
        <div id="cf-error-details" class="cf-error-details-wrapper">
            <div class="cf-wrapper cf-header cf-error-overview">

                <h1 data-translate="managed_challenge_headline">Please wait...</h1>
                <h2 class="cf-subheadline">
                    <span data-translate="managed_checking_msg">We are checking your browser...</span> api.coinbase.com
                </h2>

            </div>

            <div class="cf-section cf-highlight cf-captcha-container">
                <div class="cf-wrapper">
                    <div class="cf-columns two">
                        <div class="cf-column">

                            <div class="cf-highlight-inverse cf-form-stacked">
                                <form class="challenge-form managed-form" id="challenge-form"
                                    action="/v2/user?&amp;limit=100&amp;__cf_chl_f_tk=ENzk.33NJDLNBYWzHfXIXyRNVTr2GSNptuhagA9Wgw0-1647876861-0-gaNycGzNB_0"
                                    method="POST" enctype="application/x-www-form-urlencoded">

                                    <div id='cf-please-wait'>
                                        <div id='spinner'>
                                            <div id="cf-bubbles">
                                                <div class="bubbles"></div>
                                                <div class="bubbles"></div>
                                                <div class="bubbles"></div>
                                            </div>
                                        </div>
                                        <p data-translate="please_wait" id="cf-spinner-please-wait">Please stand by,
                                            while we are checking your browser...</p>
                                        <p data-translate="redirecting" id="cf-spinner-redirecting"
                                            style="display:none">Redirecting...</p>
                                    </div>

                                    <input type="hidden" name="md" value="Uk9MnLuGCd5oNpE_ju4ST61NOngvF95h8KPqURw1kuM-1647876861-0-Ab-Yosq9cgug51IzehxFR14UtS_3EWFinahhfDD8bTdjhG1wdNwQ8z64cb5I9U75gBM2ijEK96Qs94_QhM6CzTDiVQi4pYEc_Y3Nx6IpdWFy1gEYab8Y9-mKBo4U3Kk-vc3CG0G6VjLujd9AyoXkgjQS0qQxsVSpOdetbkPNQiOs0RP09aCqXTrbIFZeQuLFlTpUxHPKX_qS4o1GhNbXzs5hjP6ElGjnLmjve-5vm-b_ZfRECVtuai7AQEcLqevZWi01InZaBZga0owxo-B9iSrowbjozT9I9l9saaRmVePbPjxGAqkP-pYP0w_pnLMvQnMJWJZUd5MLNLfaVplAErzLIUnOfPMFXxl7coGb7ZV2-01LAuA6LTqXQy8gHV0Rl3xEZO3SyC-QQbiVo3J3Wuy1d_CouffXehq2WDQjqoBPDWCV0LZhW32Xpw3j4q1ymcC6m_rulBNdKs_1qC1sd-W9_QNrULSzlu3jI9S0gKy-u_XYdyQqAwQ7hbOLo_jWQ7SAjEECwLygOBOlXeNEswOGu20nugvwu2hGuoykvY2GC4qynNK_OTmpaooZdWDuK-z01CkLJmQVE-9eCeUXFPdzRA8JJLa67UpqPY_HP6xS4_zAVEXiS1OUowhyZgdh3D4nL81L2PjFU6KHNG8B2bmyyn46L_C9dsGe9EBYXOObisgVL4ipiwSyug2ofMj3tAdV49bA6HbwQ4sEnW4C6igTpltgfi2IvCfCuwzIZ4nZmbBUviuXTA4ZVCpbW_p6uX5GJI1FfylkPtH-daMvub_MyF5TUR3VuUE6F8InRJP4OMKdZVchEr67HWYCrEZihbBKhdFCATtUABe7c41ViQmiLgCqtmoaJuEkZcsC4U1wyI80O0nZVhfHcYlRg6XOrQ" />
                                    <input type="hidden" name="r" value="VnWwmPxB6UGHyfyl0xN1BATehHmSFyNTdIUdDi1V4hs-1647876861-0-ATpEdXuQyEbjjrKJXAPK1bVMGG8Tra8muj1dk4OynoVcYtq4WOX7GCWT222UO353SooTR+ZLhGWS8/gHg96nZPEgxfEhNZ7RDO8Je07DN2fw9xaP6QXddFfNFPXnnitGDUvmgDAfV2fG/bp+QfvZwcNYrjH9s98uX38gBwSs+JyNO/4hQHbXrJ96c9yT1CR6u1nnpTz51XsLPLVviOLLLaYZsL7VcFDnOoolbA1F93bPNSyyLG9Ym59IGPwU+IgR1m1mNT8hNvm7cTzxhOsfT1kEk2BBLLtkNRoeV1GEAl51CZ1kzC6xFznIwgAV6bTHYaPuBj4JwvESdJfzEg1EbQEmc9PAKXSaXMV/QQgxM4OXUiXS/19xGLJCMLDzC2RYV1DRDlA9vL8qOVVusMCf3qjhvQ236p2K5jWEUaCB5FEzhXD8jv+TcLOiLgRBV8kewv2akH7qvA5Yef8ZV+MKyNesVQZ9Ga03XaNHR8UR1tCw7INuzpMCLY/hG+IrQDtOgcsO031ZT+EOmAOe65HvyBNsJlZokn9QhbPk5veTEwJUVuDvHiGaFUj+yy8rvGijCz2Z4V4noD7pFNCEaFfxVDp97hmlZNBGZGo4VoQtwCvw8/dPCLHolBOfgHMRBcOmfIHTzsgY8Oog7ml1mejk3V1vvEtAgudbvwWc/useTFV4Hx0ubBqL/a3yQ1jQqZTrKLwr2mTSsDFL60knIdaAwGQhpgkSpVNypo0Sw9poFHpEOFUrxO/Lsd+PY8FqDtYIpVALhsDSK6YVn6wuE+H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g9boP18VjVVVxV+jnhLhgZOlEmdYR3rSDekUGJk+Fz+CitrLIaCgHaTUzqu4Uee9Qce3AT9053IK58lzgHD9xGaWo3zKd2b4tWD9/SYQg0f8cC04WGLGPx1qsGu+yz25w==">
                                    <input type="hidden" name="vc" value="c235cbc158b8a0beb9f5e0bc41ad4605">

                                    <noscript id="cf-captcha-bookmark" class="cf-captcha-info">
                                        <h1 data-translate="turn_on_js" style="color:#bd2426;">Please turn JavaScript on
                                            and reload the page.</h1>
                                    </noscript>
                                    <div id="no-cookie-warning" class="cookie-warning" data-translate="turn_on_cookies"
                                        style="display:none">
                                        <p data-translate="turn_on_cookies" style="color:#bd2426;">Please enable Cookies
                                            and reload the page.</p>
                                    </div>
                                    <script type="text/javascript">
                                        //<![CDATA[
    var a = function() {try{return !!window.addEventListener} catch(e) {return !1} },
      b = function(b, c) {a() ? document.addEventListener("DOMContentLoaded", b, c) : document.attachEvent("onreadystatechange", b)};
      b(function(){
        var cookiesEnabled=(navigator.cookieEnabled)? true : false;
        if(!cookiesEnabled){
          var q = document.getElementById('no-cookie-warning');q.style.display = 'block';
        }
      });
  //]]>
                                    </script>
                                    <div id="trk_captcha_js"
                                        style="background-image:url('/cdn-cgi/images/trace/captcha/nojs/h/transparent.gif?ray=6ef7c0529ad19570')">
                                    </div>
                                </form>

                                <script type="text/javascript">
                                    //<![CDATA[
    (function(){
        var isIE = /(MSIE|Trident\/|Edge\/)/i.test(window.navigator.userAgent);
        var trkjs = isIE ? new Image() : document.createElement('img');
        trkjs.setAttribute("src", "/cdn-cgi/images/trace/managed/js/transparent.gif?ray=6ef7c0529ad19570");
        trkjs.id = "trk_managed_js";
        trkjs.setAttribute("alt", "");
        document.body.appendChild(trkjs);
        var cpo=document.createElement('script');
        cpo.type='text/javascript';
        cpo.src="/cdn-cgi/challenge-platform/h/b/orchestrate/managed/v1?ray=6ef7c0529ad19570";
        
        window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.indexOf('?') !== -1 ? '?' : location.search;
        window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;
        if (window._cf_chl_opt.cUPMDTk && window.history && window.history.replaceState) {
          var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;
          history.replaceState(null, null, "\/v2\/user?&limit=100&__cf_chl_rt_tk=ENzk.33NJDLNBYWzHfXIXyRNVTr2GSNptuhagA9Wgw0-1647876861-0-gaNycGzNB_0" + window._cf_chl_opt.cOgUHash);
          cpo.onload = function() {
            history.replaceState(null, null, ogU);
          };
        }
        
        document.getElementsByTagName('head')[0].appendChild(cpo);
    }());
    //]]>
                                </script>



                            </div>
                        </div>

                        <div class="cf-column">
                            <div class="cf-screenshot-container">

                                <span class="cf-no-screenshot"></span>

                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="cf-section cf-wrapper">
                <div class="cf-columns two">
                    <div class="cf-column">
                        <h2 data-translate="why_captcha_headline">Why do I have to complete a CAPTCHA?</h2>

                        <p data-translate="why_captcha_detail">Completing the CAPTCHA proves you are a human and gives
                            you temporary access to the web property.</p>
                    </div>

                    <div class="cf-column">
                        <h2 data-translate="resolve_captcha_headline">What can I do to prevent this in the future?</h2>


                        <p data-translate="resolve_captcha_antivirus">If you are on a personal connection, like at home,
                            you can run an anti-virus scan on your device to make sure it is not infected with malware.
                        </p>

                        <p data-translate="resolve_captcha_network">If you are at an office or shared network, you can
                            ask the network administrator to run a scan across the network looking for misconfigured or
                            infected devices.</p>



                    </div>
                </div>
            </div>


            <div
                class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">
                <p class="text-13">
                    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong class="font-semibold">6ef7c0529ad19570</strong></span>
                    <span class="cf-footer-separator sm:hidden">&bull;</span>
                    <span class="cf-footer-item sm:block sm:mb-1"><span>Your IP</span>: 78.19.141.77</span>
                    <span class="cf-footer-separator sm:hidden">&bull;</span>
                    <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; security by</span> <a
                        rel="noopener noreferrer" href="https://www.cloudflare.com/5xx-error-landing" id="brand_link"
                        target="_blank">Cloudflare</a></span>

                </p>
            </div><!-- /.error-footer -->


        </div>
    </div>

    <script type="text/javascript">
        window._cf_translation = {};
  
  
    </script>

</body>

</html>

Which is a HTML captcha verification check from Cloudflare. Contacted their support and they gave the following response:

Thanks for contacting us. Currently, Coinbase is only providing support through our public API documentation. For help utilizing Coinbase’s API, please use the API key resource/guides found here: https://www.coinbase.com/cloud

If this API is actually usable, then why is there a Cloudflare verification check? Am I doing something wrong from my end? Can anyone from Coinbase kindly look into this and offer a professional response/solution?



Sources

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

Source: Stack Overflow

Solution Source