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/api-management/api-management-subscriptions.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,17 @@ author: dlepow
7
7
8
8
ms.service: api-management
9
9
ms.topic: conceptual
10
-
ms.date: 12/16/2022
10
+
ms.date: 04/19/2023
11
11
ms.author: danlep
12
12
ms.custom: engagement-fy23
13
13
---
14
14
# Subscriptions in Azure API Management
15
15
16
16
In Azure API Management, *subscriptions* are the most common way for API consumers to access APIs published through an API Management instance. This article provides an overview of the concept.
17
17
18
+
> [!NOTE]
19
+
> An API Management subscription is used specifically to call APIs through API Management. It's not the same as an Azure subscription.
20
+
18
21
## What are subscriptions?
19
22
20
23
By publishing APIs through API Management, you can easily secure API access using subscription keys. Developers who need to consume the published APIs must include a valid subscription key in HTTP requests when calling those APIs. Without a valid subscription key, the calls are:
@@ -76,7 +79,7 @@ Each API Management instance comes with an immutable, all-APIs subscription (als
76
79
77
80
### Standalone subscriptions
78
81
79
-
API Management also allows *standalone* subscriptions, which are not associated with a developer account. This feature proves useful in scenarios similar to several developers or teams sharing a subscription.
82
+
API Management also allows *standalone* subscriptions, which aren't associated with a developer account. This feature proves useful in scenarios similar to several developers or teams sharing a subscription.
80
83
81
84
Creating a subscription without assigning an owner makes it a standalone subscription. To grant developers and the rest of your team access to the standalone subscription key, either:
82
85
* Manually share the subscription key.
@@ -88,6 +91,17 @@ API publishers can [create subscriptions](api-management-howto-create-subscripti
88
91
89
92
When created in the portal, a subscription is in the **Active** state, meaning a subscriber can call an associated API using a valid subscription key. You can change the state of the subscription as needed - for example, you can suspend, cancel, or delete the subscription to prevent API access.
90
93
94
+
## Use a subscription key
95
+
96
+
A subscriber can use an API Management subscription key in one of two ways:
97
+
98
+
* Add the **Ocp-Apim-Subscription-Key** HTTP header to the request, passing the value of a valid subscription key.
99
+
100
+
* Include the **subscription-key** query parameter and a valid value in the URL. The query parameter is checked only if the header isn't present.
101
+
102
+
> [!TIP]
103
+
> **Ocp-Apim-Subscription-Key** is the default name of the subscription key header, and **subscription-key** is the default name of the query parameter. If desired, you may modify these names in the settings for each API. For example, in the portal, update these names on the **Settings** tab of an API.
104
+
91
105
## Enable or disable subscription requirement for API or product access
92
106
93
107
By default when you create an API, a subscription key is required for API access. Similarly, when you create a product, by default a subscription key is required to access any API that's added to the product. Under certain scenarios, an API publisher might want to publish a product or a particular API to the public without the requirement of subscriptions. While a publisher could choose to enable unsecured (anonymous) access to certain APIs, configuring another mechanism to secure client access is recommended.
0 commit comments