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

Cloudflare error: 1020, access Denied #330

Description

@Bojack92160

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);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions