Skip to content

Commit f8a118f

Browse files
authored
Updated key/endpoint
1 parent 0d20f1e commit f8a118f

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

java/Search/BingImageSearchv7Quickstart.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,11 @@ public class BingImageSearchv7Quickstart {
3535
// *** Update or verify the following values. ***
3636
// **********************************************
3737

38-
// Replace the subscriptionKey string value with your valid subscription key.
39-
static String subscriptionKey = "enter key here";
40-
41-
// Verify the endpoint URI. At this writing, only one endpoint is used for Bing
42-
// search APIs. In the future, regional endpoints may be available. If you
43-
// encounter unexpected authorization errors, double-check this value against
44-
// the endpoint for your Bing Web search instance in your Azure dashboard.
45-
static String host = "https://api.cognitive.microsoft.com";
38+
// Add your Bing Search V7 subscription key to your environment variables.
39+
static String subscriptionKey = System.getenv("BING_SEARCH_V7_SUBSCRIPTION_KEY");
40+
41+
// Add your Bing Search V7 endpoint to your environment variables.
42+
static String host = System.getenv("BING_SEARCH_V7_ENDPOINT");
4643
static String path = "/bing/v7.0/images/search";
4744

4845
static String searchTerm = "tropical ocean";

0 commit comments

Comments
 (0)