TrackerNetwork / TRN.Developers

Information and Issue Tracker for the Tracker Network API.
https://tracker.gg/developers
24 stars 5 forks source link

Access to V2 API with Python requests got ERROR 1020 #43

Closed nenesekai closed 2 years ago

nenesekai commented 3 years ago

It seems like it is being protected by CloudFlare. I tired using BurpSuite to send a request and the response is effective with datas. However, whether requests or urllib.request, I keep getting 403 forbidden and this annoying error 1020

Here's how I access it:

s = requests.Session()
s.headers.update({'TRN-Api-Key': key})
r = s.get('https://public-api.tracker.gg/v2/csgo/standard/profile/steam/76561198008049283')

This is what the response looks like:

<!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>Access denied | public-api.tracker.gg used Cloudflare to restrict access</title>
<meta charset="utf-8"/>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=Edge,chrome=1" http-equiv="X-UA-Compatible"/>
<meta content="noindex, nofollow" name="robots"/>
<meta content="width=device-width,initial-scale=1" name="viewport"/>
<link href="/cdn-cgi/styles/main.css" id="cf_styles-css" media="screen,projection" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="cf-wrapper">
<div class="cf-alert cf-alert-error cf-cookie-error hidden" data-translate="enable_cookies" id="cookie-alert">Please enable cookies.</div>
<div class="p-0" id="cf-error-details">
<header class="mx-auto pt-10 lg:pt-6 lg:px-8 w-240 lg:w-full mb-15 antialiased">
<h1 class="inline-block md:block mr-2 md:mb-2 font-light text-60 md:text-3xl text-black-dark leading-tight">
<span data-translate="error">Error</span>
<span>1020</span>
</h1>
<span class="inline-block md:block heading-ray-id font-mono text-15 lg:text-sm lg:leading-relaxed">Ray ID: 616b6879cba804ff •</span>
<span class="inline-block md:block heading-ray-id font-mono text-15 lg:text-sm lg:leading-relaxed">2021-01-24 17:17:27 UTC</span>
<h2 class="text-gray-600 leading-1.3 text-3xl lg:text-2xl font-light">Access denied</h2>
</header>
<section class="w-240 lg:w-full mx-auto mb-8 lg:px-8">
<div class="w-1/2 md:w-full" id="what-happened-section">
<h2 class="text-3xl leading-tight font-normal mb-4 text-black-dark antialiased" data-translate="what_happened">What happened?</h2>
<p>This website is using a security service to protect itself from online attacks.</p>
</div>
</section>
<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">616b6879cba804ff</strong></span>
<span class="cf-footer-separator sm:hidden">•</span>
<span class="cf-footer-item sm:block sm:mb-1"><span>Your IP</span>: xxx.xxx.xx.xxx</span>
<span class="cf-footer-separator sm:hidden">•</span>
<span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; security by</span> <a href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" rel="noopener noreferrer" target="_blank">Cloudflare</a></span>
</p>
</div><!-- /.error-footer -->
</div><!-- /#cf-error-details -->
</div><!-- /#cf-wrapper -->
<script type="text/javascript">
  window._cf_translation = {};

</script>
</body>
</html>
nenesekai commented 3 years ago

Seems like I have been blocked by CloudFlare? All I have done was requesting it a few times with most of them returned 403 forbidden in a very low frequency :(

bladefist commented 3 years ago

@Asiimoviet I can imagine why this is happening, it shouldn't be. Stand by, I'll get this fixed. Thanks.

nenesekai commented 3 years ago

@bladefist thx a lot, I was gonna use it for my final project which is due this thursday, man XD

jafreli commented 3 years ago

I have the same problem. Have you already solved that?

lulivi commented 3 years ago

Any progress on this issue @bladefist ?

Thanks!

XDao7 commented 2 years ago

I want to test the api with postman. I still have this problem. Is there any solution, thanks

YmmLom commented 2 years ago

My request is also getting 403 response, can you fix it, do you need my ip address?