Reputation: 1058
I want to use an API, but I can't find the Ocp-Apim-Subscription-Key at the page below:
Upvotes: 40
Views: 101261
Reputation: 1068
A subscription key is associated to a subscription. You need to go to the specific API's subscription you want the keys to (Home / API Management services / [Your APIM] / Subscriptions / [Your API's subscription]), you'll find the keys clicking in the ellipsis (three dots) button, option "Show/hide keys":
Upvotes: 1
Reputation: 459
You can find it by going to API Management services, then APIs. Select your API, your endpoint and then select the Test tab on the right hand side. Go down to Headers and against Ocp-Apim-Subscription-Key you will see it hidden; select the eye to see it.
Upvotes: 35
Reputation: 1047
I found the subscription key here:
Upvotes: 7
Reputation: 139
Not sure where everyone is getting their answers from...
Maybe it's just old information, but at this time you can find them by doing the following:
Key 1 and Key 2 are used as the "Ocp-Apim-Subscription-Key".
That's it. Those should work for you wherever it asks for the "Ocp-Apim-Subscription-Key".
Upvotes: 8
Reputation: 191
Method 1: From https://portal.azure.com/ go to your API Management service -> Subscriptions There will find default ones and some created by your own.
Method 2: Via https://resources.azure.com/ using HTTP GET method
az rest --method get `
--uri 'https://management.azure.com/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/{RESOURCE_GROUP_NAME}/providers/Microsoft.ApiManagement/service/{API_MANAGER_NAME}/subscriptions?api-version=2018-01-01' `
--query "value[0].properties.primaryKey" | ConvertFrom-Json
Explanation:
Upvotes: 5
Reputation: 184
This is how I found the keys
Upvotes: 3
Reputation: 9659
(August 2018) For our purposes (AI / ML) I found it under Cognitive Services > Resource Management > Keys - https://portal.azure.com/#blade/HubsExtension/Resources/resourceType/Microsoft.CognitiveServices%2Faccounts
It will be under other services though I can't say which (as you have to be using one to see the attributes of it).
Upvotes: 1
Reputation: 1
It's also called the Programmatic Key. As of January 2018, if you log on to luis.ai, you can find it under settings (when you click on your name in the upper right hand corner).
Not sure why the LUIS Api documentations say the key is in azure and why there's a naming difference :/
Upvotes: 0
Reputation: 461
please, following the instructions below.
Upvotes: 4