Skip to Content

sap jam apis authorization

hello,

i'm trying to use SAP JAM APIs via JSP but i'd like to set

Authorization : OAuth <AdminToken>

manually instead of using :

Context ctx = new InitialContext();
HttpDestination destination = (HttpDestination)ctx.lookup("java:comp/env/sap_jam_odata");
HttpClient client = destination.createHttpClient();

is it possible? if yes, how?

thank you so much :)

Christian

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 09, 2016 at 10:01 AM

    You would need to make sure your destination is setup to not be authenticated. The you would have code like

    HttpPost jamRequest =new HttpPost("/api/v1/OData/Groups");

    jamRequest.addHeader("Authorization", "OAuth <token>");

    Add comment
    10|10000 characters needed characters exceeded