alinulms
alinulms

Reputation: 519

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?

Upvotes: 14

Views: 30306

Answers (2)

vladvino
vladvino

Reputation: 640

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.

Upvotes: 32

Glenn Ferrie
Glenn Ferrie

Reputation: 10408

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

Upvotes: 9

Related Questions