Skip to content

Commit caeb90a

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 caeb90a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/Search/BingAutosuggestv7.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
# *** Update or verify the following values. ***
1010
# **********************************************
1111

12-
# Replace the subscriptionKey string value with your valid subscription key.
13-
subscriptionKey = 'enter key here'
12+
# Add your Bing Autosuggest subscription key to your environment variables.
13+
subscriptionKey = os.environ['BING_AUTOSUGGEST_SUBSCRIPTION_KEY']
1414

15-
host = 'api.cognitive.microsoft.com'
15+
# Add your Bing Autosuggest endpoint to your environment variables.
16+
host = os.environ['BING_AUTOSUGGEST_ENDPOINT']
1617
path = '/bing/v7.0/Suggestions'
1718

1819
mkt = 'en-US'

0 commit comments

Comments
 (0)