API Connect

API Connect

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Client-Id client and client Secret

    Posted Wed October 02, 2024 02:46 AM

    Hi team!

      I want to consume custom client id and secret in native token api (like client-id:abcdBank123 and secret ancdbank321 )  instead of using APIC client id and secret which is generated during created application .

    Any one help me about this or any documentation related to this.



    ------------------------------
    Shah Wajahat
    ------------------------------


  • 2.  RE: Client-Id client and client Secret

    Posted Tue October 08, 2024 02:36 AM

    Hi team:

    Any update?



    ------------------------------
    Shah Wajahat
    ------------------------------



  • 3.  RE: Client-Id client and client Secret

    Posted Wed October 09, 2024 09:28 AM

    Hi Shah,
    If I understand the question, you want to have the client provide the clientid and secret using a custom HTTP header instead of X-IBM-Client-Id and X-IBM-Client-Secret.  If so, you could have a pre-hook global policy that checked for the existence of these custom headers and if present, use them to update the X-IBM equivalent headers so the API behaves as if the X-IBM headers were provided up front.

    Best Regards,
    Steve Linn



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------



  • 4.  RE: Client-Id client and client Secret

    Posted Wed October 09, 2024 10:18 AM

    Yes but I don't have pre-hook global policy. Is there any other way?



    ------------------------------
    Shah Wajahat
    ------------------------------



  • 5.  RE: Client-Id client and client Secret

    Posted Wed October 09, 2024 10:25 AM

    Hi Shah,
    That's the only way I know of implementing your requirement. See https://www.ibm.com/docs/en/api-connect/10.0.5.x_lts?topic=applications-working-global-policies on how to create and manage a global pre-hook policy.  The example shows in the pre-hook policy an invoke policy, but you'd need a GatewayScript policy that met your requirement.

    Best Regards,
    Steve Linn



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------