Giter VIP home page Giter VIP logo

Comments (4)

heaversm avatar heaversm commented on June 3, 2024 1

I followed up with the npm api module folks directly on this to see if the issue was on my usage of that module, and they provided this response:

Screen Shot 2022-04-19 at 12 51 18 PM

Apparently there is no way to use the api module to interact with the emailrep API until that spec is updated.

I was able to get this to work with Axios in node though:

axios
    .get(`https://emailrep.io/${email}`, {
      headers: {
        Key: API_KEY,
        "User-Agent": "[ANY_STRING]",
      },
    })
    .then((response) => {
      console.log("success", response.data);
      res.json(response.data);
    })
    .catch((err) => {
      console.error(err);
      res.json({
        error: `there was an error with your reputation request: ${err.statusText}`,
        details: err.statusText,
      });
    });

from emailrep.io.

jkamdjou avatar jkamdjou commented on June 3, 2024

Hi @heaversm! To be honest, that is automatically generated code by our documentation system and may not be right. To use your API key, set it in the Key HTTP header:

https://docs.sublimesecurity.com/docs/emailrep-api#specify-your-api-key-in-the-key-header-field

Let me know if that works for you!

from emailrep.io.

heaversm avatar heaversm commented on June 3, 2024

from emailrep.io.

scottydev avatar scottydev commented on June 3, 2024

@heaversm was pulling my hair out over the same issue. Foursquare's API docs recommend to use the API package for Node as well but was always getting header authorization problems. Once I switched to Axios all was well again.

Thanks for the call out. Hoping the API team can sort the Node header auth issues out.

from emailrep.io.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.