cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
688
Views
0
Helpful
1
Replies

Finesse 11.6 API get User/Dialogs

vgrigoriadis
Level 1
Level 1

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 

1 Accepted Solution

Accepted Solutions

vgrigoriadis
Level 1
Level 1

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.

View solution in original post

1 Reply 1

vgrigoriadis
Level 1
Level 1

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.