In the context of an API Management (APIM) developer portal, a
subscription for a product refers to an arrangement where a client
subscribes to any API as a “product” that groups together more
APIs.
It allows DKV to provide access to the documentation of subscribed products and enables the Try It feature.
Once subscribed, the user receives a unique subscription key, which must be selected in the Try It feature to test API requests.
This key is part of the authorization process for making test API requests.
The other kind of Subscription Key is generated by the DKV and you receive it by E-Mail along with other access credentials like client_id and client_secret.
The client sends the subscription key in the request header when making real (not a test) API call for retrieving his own data.
Header: ocp-apim-subscription-key
Value: 1234567890abcdef1234567890abcdef
The API server checks the subscription key to:
Ensure that the client has access to the API.
Enforce rate limits or usage quotas based on the subscription plan.
If the subscription key is missing or invalid, the server returns an error 401 Unauthorized.
{
"code": 401,
"errors": [
{
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription.",
"field": null
}
]
}