Skip to content

Commit 31e2302

Browse files
authored
Updated key/endpoint
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.
1 parent 0d20f1e commit 31e2302

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nodejs/Search/BingCustomSearchv7.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
var request = require("request");
55

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

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

0 commit comments

Comments
 (0)