cancel
Showing results for 
Search instead for 
Did you mean: 

Basic Auth works with OKHTTP but not with OAuthSAMLConfig

0 Kudos

Hi Colleagues,

We are trying to access JAM APIs from our HCP Java App. We have recently migrated to tomcat 8 runtime, and since it doesn't have httpdestination,we have been using OKHttp for all our network calls. It works fine for normal GET/PUT/POST requests but it's not working with the JAM API(since it's using OAuthSAML) .The url returns data in postman with OAuth token but in the app, the message we are getting is :

#Got response:<?xml version="1.0" encoding="UTF-8"?> <hash> <status type="integer">0</status> <error>Internal Server Error</error> </hash>

URL:

https://jam4.sapjam.com/api/v1/OData/Groups('*$*#*@@#*!@#*')/AllContentItems?$expand=Creator&$filter=ContentItemType%20eq%20'BlogEntry'%20or%20ContentItemType%20eq%20'Page'

We are getting all the destination related properties from HCP cockpit. Can you please help ?

Accepted Solutions (0)

Answers (1)

Answers (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Saswata,

Why aren't you able to use the destinations API? To the best of my knowledge, the API is a JNDI lookup into a provided service which is made available to your java application via SDK. The tomcat 8 runtime isn't any different. Therefore I would try to make it work before moving into any other workaround solution.

Best regards,
Ivan