Oracle Analytics Cloud and Server

Products Banner

OIC Connection that has Pre-Request script based authorization



We are trying to establish OIC connection with an application. Need your help.

Content (required):

We can connect using Pre-request Script in Postman. Need to replicate it in OIC.

Pre-request Script:


var public_key = "XXXX";

var private_key = "YYYY";

var tenant_id = "ZZZZ";

var service = "search";

var method = "GET";

var endpoint = "/units/hierarchy";

var host =;

var request_string = "/byc/core/" + service + "/" + tenant_id + endpoint;

var api_url = host + request_string;

var moment = require('moment');

var timestamp_string = moment().utc().format("YYYY-MM-DD HH:mm:ss");

var verb_request_string = method + "\n\n\n" + timestamp_string + "\n" + request_string;

var encrypted_string = CryptoJS.HmacSHA1(verb_request_string, private_key);

var signed_hash = encrypted_string.toString(CryptoJS.enc.Base64);

var authorization_header = 'INTF ' + public_key + ":" + signed_hash;

postman.setGlobalVariable('timestamp_header', timestamp_string);

postman.setGlobalVariable('authorization_header', authorization_header);

postman.setGlobalVariable('api_url', api_url);

Version (include the version you are using, if applicable):

Code Snippet (add any code snippets that support your topic, if applicable):

success Screenshot from Postman.