You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cognitive-services/authentication.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ ms.author: pafarley
16
16
Each request to an Azure Cognitive Service must include an authentication header. This header passes along a subscription key or access token, which is used to validate your subscription for a service or group of services. In this article, you'll learn about three ways to authenticate a request and the requirements for each.
17
17
18
18
* Authenticate with a [single-service](#authenticate-with-a-single-service-subscription-key) or [multi-service](#authenticate-with-a-multi-service-subscription-key) subscription key
19
-
* Authenticate with a [token](#authenticate-with-an-authentication-token)
19
+
* Authenticate with a [token](#authenticate-with-an-access-token)
20
20
* Authenticate with [Azure Active Directory (AAD)](#authenticate-with-azure-active-directory)
21
21
22
22
## Prerequisites
@@ -33,7 +33,7 @@ Let's quickly review the authentication headers available for use with Azure Cog
33
33
|--------|-------------|
34
34
| Ocp-Apim-Subscription-Key | Use this header to authenticate with a subscription key for a specific service or a multi-service subscription key. |
35
35
| Ocp-Apim-Subscription-Region | This header is only required when using a multi-service subscription key with the [Translator service](./Translator/reference/v3-0-reference.md). Use this header to specify the subscription region. |
36
-
| Authorization | Use this header if you are using an authentication token. The steps to perform a token exchange are detailed in the following sections. The value provided follows this format: `Bearer <TOKEN>`. |
36
+
| Authorization | Use this header if you are using an access token. The steps to perform a token exchange are detailed in the following sections. The value provided follows this format: `Bearer <TOKEN>`. |
37
37
38
38
## Authenticate with a single-service subscription key
39
39
@@ -118,9 +118,9 @@ curl -X POST 'https://api.cognitive.microsofttranslator.com/translate?api-versio
118
118
--data-raw '[{ "text": "How much for the cup of coffee?" }]' | json_pp
119
119
```
120
120
121
-
## Authenticate with an authentication token
121
+
## Authenticate with an access token
122
122
123
-
Some Azure Cognitive Services accept, and in some cases require, an authentication token. Currently, these services support authentication tokens:
123
+
Some Azure Cognitive Services accept, and in some cases require, an access token. Currently, these services support access tokens:
124
124
125
125
* Text Translation API
126
126
* Speech Services: Speech-to-text REST API
@@ -130,15 +130,15 @@ Some Azure Cognitive Services accept, and in some cases require, an authenticati
130
130
> QnA Maker also uses the Authorization header, but requires an endpoint key. For more information, see [QnA Maker: Get answer from knowledge base](./qnamaker/quickstarts/get-answer-from-knowledge-base-using-url-tool.md).
131
131
132
132
>[!WARNING]
133
-
> The services that support authentication tokens may change over time, please check the API reference for a service before using this authentication method.
133
+
> The services that support access tokens may change over time, please check the API reference for a service before using this authentication method.
134
134
135
-
Both single service and multi-service subscription keys can be exchanged for authentication tokens. Authentication tokens are valid for 10 minutes.
135
+
Both single service and multi-service subscription keys can be exchanged for access tokens in JSON Web Token (JWT) format. Access tokens are valid for 10 minutes.
136
136
137
-
Authentication tokens are included in a request as the `Authorization` header. The token value provided must be preceded by `Bearer`, for example: `Bearer YOUR_AUTH_TOKEN`.
137
+
Access tokens are included in a request as the `Authorization` header. The token value provided must be preceded by `Bearer`, for example: `Bearer YOUR_AUTH_TOKEN`.
138
138
139
139
### Sample requests
140
140
141
-
Use this URL to exchange a subscription key for an authentication token: `https://YOUR-REGION.api.cognitive.microsoft.com/sts/v1.0/issueToken`.
141
+
Use this URL to exchange a subscription key for an access token: `https://YOUR-REGION.api.cognitive.microsoft.com/sts/v1.0/issueToken`.
142
142
143
143
```cURL
144
144
curl -v -X POST \
@@ -166,7 +166,7 @@ These multi-service regions support token exchange:
166
166
-`westus`
167
167
-`westus2`
168
168
169
-
After you get an authentication token, you'll need to pass it in each request as the `Authorization` header. This is a sample call to the Translator service:
169
+
After you get an access token, you'll need to pass it in each request as the `Authorization` header. This is a sample call to the Translator service:
170
170
171
171
```cURL
172
172
curl -X POST 'https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=en&to=de' \
0 commit comments