goferito / node-bing-api

Node.js module for the Bing Search API (Cognitive Services)
MIT License
56 stars 28 forks source link

v7 Supported? #44

Closed mtrivera closed 6 years ago

mtrivera commented 6 years ago

I registered for Bing Search API and I have 28 days remaining. But I get this message when I try to test it. I've tried both keys to no success.

"{ \"statusCode\": 401, \"message\": \"Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription.\" }"

ralyodio commented 4 years ago

I still get resource not found.

CognitiveServices now forces you to use your own endpoint.

I'm not sure how to pass it. The endpoints for /news/search is what i want.

I'm trying this:

 this.client = require('node-bing-api')({ accKey: opts.apiKey, rootUri: opts.rootUri });

apiKey is my api key and rootUri is BING_ENDPOINT=https://puump.cognitiveservices.azure.com/bing/v7.0