Layer7 API Management

 View Only
  • 1.  Getting Error : API Key invalid or not Authorized to call this API

    Posted Aug 05, 2019 12:59 AM
    Hi,

    We are using the pre-requisite "API Portal Integration Fragment - API Key" fragment. We have also registered the API with application from developer portal and using the API Key from there. Generated access token with the same client credentials of the same application. Using the same access token when we are trying to hit the API we are getting error as " API Key invalid or not Authorized to call this API".

    Can you please help to debug the issue and please do let us know if any configuration needs to be changed or added.


  • 2.  RE: Getting Error : API Key invalid or not Authorized to call this API

    Posted Aug 13, 2019 05:34 AM
    Hi,

    Can anyone help me in this scenario .


  • 3.  RE: Getting Error : API Key invalid or not Authorized to call this API

    Broadcom Employee
    Posted Aug 13, 2019 07:16 PM
    Dear Mukesh,
    I am confused,
    - on my lab box, I only see "Standard Policy Template Fragment - API Key", I cannot find your fragment, what's the version of your portal?
    - API key authentication is different with token authentication
    - when you call the API, did you put the api key as parameter in your request?

    BTW: it's difficult to debug/reproduce problem via community, open a support ticket could be easier.

    Regards,
    Mark


  • 4.  RE: Getting Error : API Key invalid or not Authorized to call this API
    Best Answer

    Posted Aug 14, 2019 02:21 AM

    Hi Mark,

    I believe that he is using Portal 4.2
    The Encapsulated Assertions are from 

    https://docops.ca.com/ca-api-developer-portal-enhanced-experience/4-2/en/publishers/manage-apis/publish-apis

    @Mukesh Patra
    Do check that your Policies have the following additional properties 

    internal.portalAPIEnabled, set to true