The most common and secure way is to pass the subscription key in the request header.
The header name is exactly Ocp-Apim-Subscription-Key , and the value is your unique key.
Here is how you would do this using different tools/language
curl -X GET "https://annie-insights-api-mgmt.azure-api.net/ai-lateral-point/" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY"
Open the Headers tab for your request.
In the Key field, type Ocp-Apim-Subscription-Key.
In the Value field, paste your actual subscription key.
Send the request
url = "https://annie-insights-api-mgmt.azure-api.net/ai-lateral-point/"
headers = {
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
response = request.get(url, headers=headers)
print(response.json())
using System.Net.Http;
var client = new HttpClient();
client.DefaultRequestHeaders.Add(Ocp-Apim-Subscription-Key", "YOUR_SUBSCRIPTION_KEY")
HttpResponseMessage response = await client.GetAsync("https://annie-insights-api-mgmt.azure-api.net/ai-lateral-point/")
string result = await response.Consent.ReadAsStringAsync();
Some APIs also support including the key as a query parameter named subscription-key in the URL itself. This is typically checked only if the header is not present. This method is less secure as the key might be logged in server access logs or browser history.
Example URL: