07-01-2019 03:28 AM
Dear community.
I am trying to simply get a User's Dialogs from the finesse API (v.11.6)
I use a GET request from the https://uccxFQDNHostname:8445/finesse/api/User/TEST/Dialogs using node.js.
The options that include in the header of the HTTPS request are the following:
var options = {
method: "GET",
hostname: "uccxFQDNHostname",
port: 8445,
rejectUnauthorized: 'false',
cert: fs.readFileSync('uccxservercert.com.crt'),
ca: [ fs.readFileSync('uccxservercert.com.crt') ],
checkServerIdentity: () => { return null; },
path: '/finesse/api/User/TEST/Dialogs',
headers: { 'Authorization':'Basic' +user+':'+passw },
cacheControl: 'no-cache',
Connection: 'keep-alive'
};
However I am getting a TCP Error: socket hang up
code: 'ECONNRESET'
as if there is no response from the uccx server.
I do get a successfull response if I use POSTMAN instead.
Could you please guide me with the header options.
Am I missing something? Perhaps with the basic authentication?
Thank you very much for your suggestions.
Kind regards
Vasilis
Solved! Go to Solution.
07-02-2019 11:20 PM
Dear all,
I modified the HTTP request as follows and the problem was solved:
rejectUnauthorized: 'true',
requestCert: true,
agent: false,
Please consider this question answered/solved.
Thanks.
07-02-2019 11:20 PM
Dear all,
I modified the HTTP request as follows and the problem was solved:
rejectUnauthorized: 'true',
requestCert: true,
agent: false,
Please consider this question answered/solved.
Thanks.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide