Skip to content

Commit 8568b72

Browse files
committed
auth section
1 parent 5b6683d commit 8568b72

File tree

1 file changed

+3
-4
lines changed
  • articles/cognitive-services/Face/QuickStarts

1 file changed

+3
-4
lines changed

articles/cognitive-services/Face/QuickStarts/go-sdk.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,12 @@ These code samples show you how to complete basic tasks using the Face service c
163163
## Authenticate the client
164164

165165
> [!NOTE]
166-
> This quickstart assumes you've [created an environment variable](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account#configure-an-environment-variable-for-authentication) for your Face service key, named `TBD_KEY`.
166+
> This quickstart assumes you've [created environment variables](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account#configure-an-environment-variable-for-authentication) for your Face key and endpoint, named `FACE_SUBSCRIPTION_KEY` and `FACE_ENDPOINT` respectively.
167167
168-
In a new method, instantiate a client with your endpoint and key. Create a [CognitiveServicesCredentials](https://docs.microsoft.com/python/api/msrest/msrest.authentication.cognitiveservicescredentials?view=azure-python) object with your key, and use it with your endpoint to create an [ApiClient]() object.
168+
Create a `main` function and add the following code to it to instantiate a client with your endpoint and key. You create a [CognitiveServicesAuthorizer](https://godoc.org/github.com/Azure/go-autorest/autorest#CognitiveServicesAuthorizer) object with your key, and use it with your endpoint to create a [Client](https://godoc.org/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/face#Client) object.
169169

170-
```go
170+
[!code-go[](~/cognitive-services-quickstart-code/go/Face/FaceQuickstart.go?name=snippet_main_client)]
171171

172-
```
173172

174173
## Example task 1
175174

0 commit comments

Comments
 (0)