How to connect to Reltio through domo

Hi Team,

I am trying to connect to Reltio via api connector. Since the connector is not available in repository I am trying to build it manually.

 

Connecting to reltio consists of calling an API with username and password. The API uses a basic authentication with base64 encoded Authorization header. Also the URL consists of query parameters like username , password and grantType. 

I am using the below script, but it is not working. Can you please help me in this:

 

Script: 

 

//This logging is here for testing! Remove before publishing your connector
DOMO.log('metadata.account.username: ' + metadata.account.username);
DOMO.log('metadata.account.password: ' + metadata.account.password );

var encodedData = DOMO.b64EncodeUnicode(metadata.account.username + ':' + metadata.account.password);
var metadata.account.user = 'requisite username';
var metadata.account.pass = 'requisite password';

httprequest.addHeader('Authorization', 'Basic ' + encodedData);

var res = httprequest.get('https://auth.reltio.com/oauth/token?username=' + metadata.account.user&'password=' + metadata.account.pass&'grant_type=password');

if(res.indexOf('Account.Name') > 0){
auth.authenticationSuccess('Success');
} else {
auth.authenticationFailed('Failed');
}

Comments

This discussion has been closed.