Vinted Request Blocked in Javascript

I want to do some requests on the Vinted website, I have a code python which works perfectly, but the "same" code in JavaScript doesn't. Vinted's Cloudflare block the request after 1 request, with the code 1020 (access denied).

I start my script with the command node index.js

Here is the python code

import requests;

headers = requests.utils.default_headers()
headers.update({"User-agent":"Mozilla/5.0"})
response = requests.get("", headers=headers)

print(response)

headers = requests.utils.default_headers()
headers.update({"User-agent":"Mozilla/5.0"})
response = requests.get("", headers=headers)

print(response)

And here the JS one

const config = {
    method: 'get',
    url: '
    headers: { 
      'User-Agent': 'Mozilla/5.0', 
      'Accept-Encoding': 'gzip, deflate', 
      'Accept': '*/*', 
      'Connection': 'keep-alive'
    }
  };
  
axios(config).then(function (response) {
    console.log(response);
    axios(config).then(function (response) {
        console.log(response);
    })
})

The Vinted error is

<h1>Access denied</h1>
<p>You do not have access to  site owner may have set restrictions that prevent you from accessing the site. Contact the site owner for access or try loading the page again.</p>
<ul class="cferror_details">
<li>Ray ID: 7126ef811e8376e1</li>
<li>Timestamp: 2022-05-28 12:18:54 UTC</li>
<li>Your IP address: X.X.X.X</li>
<li class="XXX_no_wrap_overflow_hidden">Requested URL:  </li>
<li>Error reference number: 1020</li>
<li>Server ID: FL_376F42</li>
<li>User-Agent: Mozilla/5.0</li>
2
James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article