cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Header "Cookie" converted to SHA256 automatically in CPI

ameyac3
Newcomer
674

Hi Experts,

Third party vendor's API is using header "Cookie" for Authentication. For example, value of "Cookie" is fastemsssotoken=7b681045d1083a0a003ba4c94e0220f047cfd876015b96b4dc10938f08602d6542. I have created header "Cookie" in the Content Modifier before connecting to the API using HTTP Adapter and assigned the above-mentioned value by setting the Source Type as Constant. But SAP CI is converting it to SHA256. Please refer the attached screenshot. The API is not accepting the SHA256 value and throwing http error 403. Please provide any solution/workaround.

 

Thanks & Regards,

Amey

 

Accepted Solutions (0)

Answers (1)

Answers (1)

philippeaddor
Active Participant
0 Kudos

Hi, a cookie is set by the target server upon authentication... How come you want to statically set this? It usually refers to an http session (on the server) which expires after a while. So it should be retrieved dynamically. Does your API vendor support e.g. Oauth 2.0 authentication or similar? Then you should start from there.

Usually, you don't have to worry about cookies. The http adapter will set it automatically when you reuse the session. See runtime configuration: 

philippeaddor_0-1718031868985.png