Skip to content

Commit 2d3f48f

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 2d3f48f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dotnet/Search/BingVideoSearchv7.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ class Program
1717
// **********************************************
1818

1919
// Replace the accessKey string value with your valid access key.
20-
const string accessKey = "enter key here";
20+
const string accessKey = Environment.GetEnvironmentVariable("BING_SEARCH_V7_SUBSCRIPTION_KEY");
2121

2222
// Verify the endpoint URI. At this writing, only one endpoint is used for Bing
2323
// search APIs. In the future, regional endpoints may be available. If you
2424
// encounter unexpected authorization errors, double-check this value against
2525
// the endpoint for your Bing search instance in your Azure dashboard.
26-
const string uriBase = "https://api.cognitive.microsoft.com/bing/v7.0/videos/search";
26+
const string uriBase = Environment.GetEnvironmentVariable("BING_SEARCH_V7_ENDPOINT") + "/bing/v7.0/videos/search";
2727

2828
const string searchTerm = "kittens";
2929

0 commit comments

Comments
 (0)