Azure / api-management-developer-portal

Developer portal provided by the Azure API Management service.
MIT License
488 stars 318 forks source link

API details widget: Add subscription key to the request header by default - if subscription is required #1047

Closed AnRei123 closed 7 months ago

AnRei123 commented 3 years ago

Background information

Most of our APIs require a subscription of the associated API product. When sending a request for an API with required subscription, the subscription key as well as an application or user access token have to be added to the header of our API s for authorization purposes.

Bug description

In the new DevPortal, on the top of the Try it panel, there is a section called Authorization that includes the subscription key for the associated API product.

NewDevPortal_TryItPanel_AuthorizationSection

Here my observations on this subscription key in the new portal:

NewDevPortal_ApiDetailsPageAndTryItPanel_HeaderSection - Kopie

Isn´t the current behavior very weird?

I looked up, how the subscription key was implemented in the legacy portal and found that it hasn´t been automatically displayed if you haven´t added it manually via the request header. So it appeared only one time in the Try it section.

LegacyPortal_TryItPanel_inHeaderSection

Expected behavior

If the currently logged-in user has subscribed to the API product, the current look and behavior of the Try-it panel would be ok.

TryItPanel_SubscriptionKeyIfSubscribed

Is your portal managed or self-hosted?

Managed

Environment

mikebudzynski commented 3 years ago

@AnRei123 Thanks for bringing this up.

Note that the subscription key dropdown should include keys to select if a user is subscribed to a Product, which contains the API.

mrcarlosdev commented 7 months ago

This issue is related to managed developer portal. We advise you to create a Azure support request to get assistance on this issue. Please refer to the below link to create a new Azure support request, Please select Problem Type = "Developer Portal" in the request to route it appropriately.

https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request