Hi @Novishan Dissanayake,
Have you tried specifying the headers you see in Postman in the “Additional Headers” field under Rest Address Data?
Hope this helps!
Hi @Charith Epitawatta,
Thank you for the input. Yes, I tried adding the headers to the Routing Address but it wasn’t a success.
Best Regards,
Novishan
Hi @Binura Dodangoda,
Thank you for the input. The suggested link says about accessing an IFS projection itself but our question lies with accessing a third-party API endpoint.
Best Regards,
Novishan
Solution: With the help of a teammate, we were able to retrieve the access token and it was done by adding the http_req_headers and query_parameters to the Rest Sender method in the code.
Hi @Novishan Dissanayake
I'm having trouble too, so could you please provide the source details and a hard copy of the routing address?
Best Regards,
Midori
Hi @Novishan Dissanayake, @NECMIOH,
Turns out this occurs because IFS sends client credentials in both the request header and the body and some authentication providers do not support that, which causes the 401 error. In Postman you can control where to send the credentials, which is why you were not getting the error.
This is now fixed in IFSAPP10 UPD22 via patch ID 167255. This patch introduces a new property to control whether the client credentials will be sent in the request header or the body or both.
Property - ifs.includeClientCredentials
Expected values - body|header|both
Eg: ifs.includeClientCredentials: header
You can add the property in following 2 ways.
- Add it to the
ifs.properties
file located in \\<IFS_HOME>\instance\<InstanceID>\conf directory. - Add it to J2EE server properties via IEE client as described in this documentation.
Hope this helps!
@Charith Epitawatta
Thank you for the information.
In my case, this problem occurs with IFSCloud23R4.
Best Regards,
Midori
All, is this now sorted in IFS Cloud versions ?