bzarras / newsapi

A promise-based node interface for NewsAPI
MIT License
144 stars 39 forks source link

No API key specified #36

Open kofesto opened 3 years ago

kofesto commented 3 years ago

const NewsAPI = require('newsapi');

const newsapi = new NewsAPI(MY_API_KEY) my console tells me "No API key specified" yet the API key is there, i later copied the API key from the .env file, place it, and still got the same error

YannyTwoo commented 2 years ago

This isn't a NewsAPI issue if it worked fine when you pasted the API key into the parameter. Might just be that you hadn't added require('dotenv').config();