Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Azure API Management can i use the subscription-key as part of Request headers instead of Query string parameter?

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?

like image 602
alinulms Avatar asked Jul 24 '14 13:07

alinulms


People also ask

What is subscription key in API?

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.


2 Answers

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.

like image 130
vladvino Avatar answered Sep 20 '22 21:09

vladvino


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.

enter image description here

like image 37
Glenn Ferrie Avatar answered Sep 18 '22 21:09

Glenn Ferrie