Skip to content

Commit 1ee3b91

Browse files
authored
Merge pull request #64 from wiazur/patch-24
Updated key/endpoint
2 parents f3d6bfc + 9251fe8 commit 1ee3b91

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

dotnet/Search/BingWebSearchv7.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,11 @@ class Program
1616
// *** Update or verify the following values. ***
1717
// **********************************************
1818

19-
// Replace the accessKey string value with your valid access key.
20-
const string accessKey = "enter key here";
21-
22-
// Verify the endpoint URI. At this writing, only one endpoint is used for Bing
23-
// search APIs. In the future, regional endpoints may be available. If you
24-
// encounter unexpected authorization errors, double-check this value against
25-
// the endpoint for your Bing Web search instance in your Azure dashboard.
26-
const string uriBase = "https://api.cognitive.microsoft.com/bing/v7.0/search";
19+
// Add your Azure Bing Search V7 subscription key to your environment variables
20+
const string accessKey = Environment.GetEnvironmentVariable("BING_SEARCH_V7_SUBSCRIPTION_KEY");
21+
22+
// Add your Azure Bing Search V7 endpoint to your environment variables
23+
const string uriBase = Environment.GetEnvironmentVariable("BING_SEARCH_V7_ENDPOINT") + "/bing/v7.0/search";
2724

2825
const string searchTerm = "Microsoft Cognitive Services";
2926

0 commit comments

Comments
 (0)