Skip to Content

Passing Dynamic Oauth Token & API Key in Header of Sender REST Adapter

Hi All,

I'm configuring sender REST Pooling to consume Ariba API. I'm passing two value 1st temporary oauth token and 2nd API Key in header filed, it's working fine. API Key is constant but token is getting expire in every 27 minutes.

I have written java code to fetch token dynamically and passing it in DynamicConfiguration, but don't know where to put access_token variable in REST Adapter.

DynamicConfiguration conf = input.getDynamicConfiguration(); DynamicConfigurationKey keyHeader1 = DynamicConfigurationKey.create("", "HeaderFieldOne"); conf.put(keyHeader1, "Bearer "+access_token);

Please guide me with two thing

1. Java mapping code to generate token (i have written, but need sample code to understand better)

2. How to configure token variable in sender REST adapter.


When i select REST in Message Protocol, XI Dynamic Attribute is coming but HTTP Header tab is not there, where i will mention

Authorization Bearer {access_token}?

Appreciate your time,

Binod Kumar

1.png (16.2 kB)
2.png (23.3 kB)
3.png (17.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer