Skip to content

Commit d02e69f

Browse files
authored
Updated key
Changing all authentication variables to environment variables with standard naming.
1 parent bc9f2dd commit d02e69f

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

Search/BingVideoSearch/src/main/java/com/microsoft/azure/cognitiveservices/search/videosearch/samples/BingVideoSearchSample.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,9 @@ public static void main(String[] args) {
249249
try {
250250
//=============================================================
251251
// Authenticate
252-
253-
// If you are going to set the AZURE_BING_SAMPLES_API_KEY environment variable, make sure you set it for your OS, then reopen your command prompt or IDE.
254-
// If not, you may get an API key not found exception.
255-
// IMPORTANT: if you have not set the `AZURE_BING_SAMPLES_API_KEY` environment variable to your cognitive services API key:
256-
// 1. comment out the below line
257-
final String subscriptionKey = System.getenv("AZURE_BING_SAMPLES_API_KEY");
258-
// 2. paste your cognitive services API key below, and uncomment the line
259-
//final String subscriptionKey = "enter your key here";
252+
// Set the BING_SEARCH_V7_SUBSCRIPTION_KEY environment variable with your subscription key,
253+
// then reopen your command prompt or IDE. If not, you may get an API key not found exception.
254+
final String subscriptionKey = System.getenv("BING_SEARCH_V7_SUBSCRIPTION_KEY");
260255

261256
BingVideoSearchAPI client = BingVideoSearchManager.authenticate(subscriptionKey);
262257

0 commit comments

Comments
 (0)