Skip to content

Commit

Permalink
Updated key/endpoint
Browse files Browse the repository at this point in the history
Endpoints are not region-based anymore, but rather custom domain -based. Although regional endpoints will still work. Also, the authentication information is moving to a standard of getting it from environment variables.
  • Loading branch information
wiazur authored Sep 4, 2019
1 parent 0d20f1e commit 31e2302
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nodejs/Search/BingCustomSearchv7.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

var request = require("request");

var subscriptionKey = 'YOUR-SUBSCRIPTION-KEY';
var subscriptionKey = process.env['BING_CUSTOM_SEARCH_SUBSCRIPTION_KEY']
var customConfigId = 'YOUR-CUSTOM-CONFIG-ID';
var searchTerm = 'microsoft';

var options = {
url: 'https://api.cognitive.microsoft.com/bingcustomsearch/v7.0/search?' +
url: process.env['BING_CUSTOM_SEARCH_ENDPOINT'] + "/bingcustomsearch/v7.0/search?' +
'q=' + searchTerm +
'&customconfig=' + customConfigId,
headers: {
Expand Down

0 comments on commit 31e2302

Please sign in to comment.