Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth to crunchbase API fail #13

Open
ghost opened this issue Jun 6, 2017 · 0 comments
Open

Auth to crunchbase API fail #13

ghost opened this issue Jun 6, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 6, 2017

I'm trying to simply request the crunchbase API in NodeJs but using and executing this code :

var apikey = 'xxxxxxxxxxxxxxxxxxxxxxx';

var crunchbase = require('crunchbase2');

crunchbase.init(apikey);

crunchbase.organization({
  query: "airbnb"
}, function(error, results) {
  //  console.log(results);
  if (!error) {
    console.log(results) // Print the search results
  } else {
    console.log(error);
  }
});

If I print the result its look like HTML code from a login page form...

<html>
  <head>
    <title>Access Restricted</title>
    <style>
      body {
        margin-top: 10em;
        font-family: sans;
        text-align: center;
        overflow: hidden;
      }

      form { font-size: 1.3em; }
      input { border: 1px solid #cccccc; }
      p { font-size: small; }
      label {  font-size: bigger; }
    </style>
  </head>

  <body>
      <form action="/access_code" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="tDS1P7npmXsrF8wo/h5xxfciAuHjE1cC8T+xpQ0qNHpSSjuLPYPvAGvRdz9biJbIIaxvgXu3P52ZOqFSs4i/rg==" />
        <label for="access_code">Access code</label>
        <input type="password" name="access_code" id="access_code" />
        <input type="submit" name="commit" value="Enter" />
</form>      <p>
        You can setup the site access code in your admin dashboard
        under <em>'Settings &gt; Developer Portal'.</em>
      </p>
      <p>Please make sure that you have cookies enabled!</p>
  </body>
</html>

Does anyone know how to fix it ?

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

No branches or pull requests

0 participants