I am migrating a service to Azure API Management. This service is being called from mobile devices (native apps). Problem is that appending the subscription-key to the query string can take much longer for updating the app than just using it in the request headers.
So is it possible to use it there?
Subscription keys are the common way to access the Azure APIs in APIM instance. If the API requires subscription key to access it by the user, then we call it as secured API. Otherwise, it is unsecured API and mostly used by the public.
The subscription key can be passed either in the header or in the URL query parameter. The header is checked first. The query parameter is checked only if the header is not present. The header name is Ocp-Apim-Subscription-Key
by default though you can change it; the same holds for the query parameter whose default name is subscription-key
.
As an Add-on to @vladvino post. This is configurable per API. It is available in the Setting pane of the API Settings in the Azure APIM Portal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With