Skip to Content
Sep 14, 2020 at 11:19 AM

Passing a variable token information to httpheader.Authorization parameter in HTTP Call atom



I am creating a scenario using B1if (version 1.22.28) in which I want to create a Sales Order in SAP Business One (version 10.0, PL 02) by fetching the data from a third party system. The handover of information from third party system is in the form of JSON.

In order to access the correct resource, I first need to get a token generated from the other system. There is no problem with this step and I am able to get the required token using an HTTP Call atom. Now, in the next step I need to use this token in order to access the required resource and here is where I am stuck.

I have created a variable ($Token) which stores the value of token generated from previous HTTPCall atom. Now, I want to pass this value to httpheader.Authorization parameter so that I get the access. However, from what I've seen so far I cannot pass the variable in the value of the parameter as it only accepts a fixed value. i.e. something like below.

<par id="httpheader.Authorization" value="Bearer Enbh4CIs1AROOmIBJyTzKH8YxIwW0m3ix3OnJp79ecGwD1L3663m_GHBz2PysBPUTx-iBUkgJfGNJrrLPXnriFsZgO1U93OeQPwra4eqeFFKfPbenz43oV5WgGTtn-8oHwxWCpbrP7tI7D7JssRCsRxE7vIM9omaAeKP2X9yYHGoiv27CZTSTCb0uWP_VCofMcC-XrKKBe_orTk-OKStb0Z7YPLYjTZznUxcPZONB_Uzh8plTYKPiJJZv71sNPke1LpESADp7EGr7eVCKxWWAA"></par>

But what I want is to do something like this (I know below code is wrong but it is only for understanding)

<par id="httpheader.Authorization" value="$Token"></par>

A quick help will be highly appreciated.

Let me know if any more information is required.

Best Regards,

Ninad Vaidya