Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Cloudflare error: 1020, access Denied #330

Open
Bojack92160 opened this issue Feb 23, 2020 · 2 comments
Open

Cloudflare error: 1020, access Denied #330

Bojack92160 opened this issue Feb 23, 2020 · 2 comments

Comments

@Bojack92160
Copy link

Cloudscraper version: 4.6.0

I am basicaly in the same situation than #266 (same link and everything): can't post request to http://haapi.ankama.com/json/Ankama/v2/Api/CreateApiKey .
I tried to add cipher strings like so:

cloudscraper.defaultParams.agentOptions.ciphers += ':!ECDHE+SHA:!AES128-SHA:!AESCCM:!DHE:!ARIA';

but I still get 1020 error. Here is all my code:

const cloudscraper = require('cloudscraper');
 cloudscraper.defaultParams.agentOptions.ciphers += ':!ECDHE+SHA:!AES128-SHA:!AESCCM:!DHE:!ARIA';

async function getapikey(log, mdp, Proxy) {
   try {
     let url = "https://haapi.ankama.com/json/Ankama/v2/Api/CreateApiKey";
     let options = {
       uri: url,
       proxy: Proxy,
       formData: {
         login: log,
         password: mdp,
         long_life_token: "false"
       }
     };
     let response = JSON.parse(await cloudscraper.post(options));
     console.log("APIKEY:", response.key);
     return response.key;
   } catch (error) {
     console.log(error.stack);
   }
}

getapikey("AccountName","Pswd",null);

@wiktorpikosz
Copy link

I have very similarly a bug. But it's when I use nodejs 10. On nodejs 8.X works fine. It's very interesting and I can't fine a solution for this problem.

@mdashlw
Copy link

mdashlw commented Mar 7, 2020

Started getting the same error a few hours ago. From different IPs. Website works on my local pc, however when I set up proxy on my own server that never made any requests to the website, I started getting this error.
Tried downgrading, using some ciphers from similar issues - nothing worked. Getting 1020 error even when using plain request without cloudscraper.
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants