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.  Oauth Token generation with custom data

    Posted 11 days ago

    Hi all,

    I have created a service for OAuth token generation in IBM API Connect. I have also configured an external URL in the OAuth flow, and I'm setting metadata values from this external call.

    I can see the metadata is properly set and available during token introspection.

    Now, I want to conditionally set the X-API-OAUTH-METADATA-FOR-ACCESSTOKEN header based on custom parameter values passed during the token generation request.

    Is it possible to read these custom values (e.g., department, user type, etc.) and dynamically set the metadata header value before issuing the access token?
    Where should this logic be handled – in the mapping rule, GatewayScript, or any other recommended method?


    Any help or direction would be greatly appreciated. Thank you!



    ------------------------------
    Gibin G Luke
    ------------------------------


  • 2.  RE: Oauth Token generation with custom data

    Posted 10 days ago

    Hi,
    Please get the custom values and set the token in the gatewayscript only.

    Thanks



    ------------------------------
    Nrusingha Sahoo
    ------------------------------