Oracle Analytics Forum

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

OIC Connection that has Pre-Request script based authorization

Closed
109
Views
2
Comments
Yekshika R
Yekshika R Rank 1 - Community Starter

Summary:

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 = https://logic-sandbox.interfolio.com;

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.


Answers

  • RaMai
    RaMai Rank 1 - Community Starter

    Hi Yekshika,

    Did you ever get this to work? I'm looking at a similar scenario, OAUTH2 connection which requires a pre-run script to generate access token.

    If you got it working it would be great if you could share your solution, much appreciated!

    Cheers,

    Ralf

  • Hi @RaMai ,

    If you have a question about OIC (Oracle Integration Cloud), you should try to visit the forum that cover that product (OCI is not an Oracle Analytics product).

    Have a look in https://community.oracle.com/customerconnect , it has lot of categories and can be a bit confusing at first, but OIC is covered there.

This discussion has been closed.