Skip to content

Commit b9898f8

Browse files
authored
Updated endpoint and key
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 3b06248 commit b9898f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dotnet/InkRecognition/quickstart/recognizeInk.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ namespace ConsoleApp7
1313
class Program
1414
{
1515
// Replace the subscriptionKey string with your valid subscription key.
16-
const string subscriptionKey = "YOUR_SUBSCRIPTION_KEY";
16+
const string subscriptionKey = Environment.GetEnvironmentVariable("INK_RECOGNITION_SUBSCRIPTION_KEY");
1717

1818
// Replace the dataPath string with a path to the JSON formatted ink stroke data.
1919
const string dataPath = @"PATH_TO_INK_STROKE_DATA";
2020

2121
// URI information for ink recognition:
22-
const string endpoint = "https://api.cognitive.microsoft.com";
22+
const string endpoint = Environment.GetEnvironmentVariable("INK_RECOGNITION_ENDPOINT");
2323
const string inkRecognitionUrl = "/inkrecognizer/v1.0-preview/recognize";
2424

2525
static async Task<string> Request(string apiAddress, string endpoint, string subscriptionKey, string requestData)

0 commit comments

Comments
 (0)