PureConnect

 View Only
Discussion Thread View
  • 1.  ICWS setting up

    Posted 11-17-2020 10:33
    Hello guys,
    I'm Davide, and I'm at the newest in the community ant ICWS API as well.
    I'm trying to use API to do some task, but, first of all, I need to open a session...and I have my probelm.
    In fact I don't understand why my CIC give me the answer when I try to get the session id:


    The message is in italian, but meas: "This session Manager doesn't accept connections at the moment".
    But when I'm asking the info about the installation, I got it:


    Do you have any idea?
    please let me know
    Thanks!
    davide
    #Unsure/Other

    ------------------------------
    Davide

    ------------------------------


  • 2.  RE: ICWS setting up

    Posted 11-17-2020 10:43

    Davide,

    It appears that you're communicating with a switchover pair and likely hitting the backup server, or potentially your hitting an off server session manager that isn't active.  I don't know your configuration to know for sure, but that is what that error is telling you.

    You can always try substituting in the server name of the server you know to be active in the request URL you are sending to see if that works.

    The error you are getting is referenced in this article:  https://help.genesys.com/developer/cic/docs/icws/webhelp/conceptualcontent/GettingStarted_Connecting.htm

    It is in the "Connecting to a Switchover Pair or Off-Server Session Managers section.



    ------------------------------
    AARON LAEL
    State of Utah
    ------------------------------



  • 3.  RE: ICWS setting up

    Posted 11-17-2020 12:00
    Hello Aron, you are right, but now I'm more confuse....sorry!
    Here below my code:
    const data = { 
            '__type':'urn:inin.com:connection:icAuthConnectionRequestSettings',
            'applicationName':'ICWS Example Application',
            'userID':'USERID',
            'password':'MYPASSWORD',
            'Accept-Language': 'en-us'
        };  
    fetch(uri, {
      method: method, // or 'PUT'
      headers: {
        'Content-Type': 'application/json',  //'Content-Type': 'application/x-www-form-urlencoded'
      },
      body: JSON.stringify(data),  //JSON.stringify(data),
    })
    .then(response => response.json()) //.json()   .text()
    .then(data => {
      console.log('Success:', data);
      document.getElementById('message').innerText = data;
    })
    .catch((error) => {
      console.error('Error:', error);
    });
    
    ​


    Where I should fill in the "alternative"...and what I'm wrong.
    Really thank you for your help.
    Davide



    ------------------------------
    Davide Graziani
    Arval Service Lease
    ------------------------------



  • 4.  RE: ICWS setting up

    Posted 11-17-2020 12:04
    I'm not too sure how helpful I can be beyond what I've provided.  All of the work that I've done with ICWS isn't using the Genesys helper libraries.  I've done it with python using requests or made my own requests using similar patterns with javascript using XMLHttpRequest to replicate familiar python.

    ------------------------------
    AARON LAEL
    State of Utah
    ------------------------------



  • 5.  RE: ICWS setting up

    Posted 11-17-2020 13:11
    Ciao Aaron, fetch it's just something very similar to XMLHttpRequest, if you have an example also in python should be very useful.
    Thanks!
    davide

    ------------------------------
    Davide Graziani
    Arval Service Lease
    ------------------------------



  • 6.  RE: ICWS setting up

    Posted 11-18-2020 08:25
    Hi Davide,

    Accept-Language should be part of the headers of the HTTP request and not the JSON body of the POST. Also, in my ICWS requests, I always use the Content-Type application/vnd.inin.icws+JSON; charset=UTF-8.

    ------------------------------
    Donald Hamel
    Bell Canada
    ------------------------------



  • 7.  RE: ICWS setting up

    Posted 11-18-2020 08:50
    Hello Donald,
    following you suggestion setting Accept-Language in header I got finally an answer!
    In fact I got back the list of Session managers array, so selecting the first one, I got the session id.
    Now...I'm starting to play...
    I'm sure I'll bother you again...You need to have patience. :)
    Thank you so much!
    Davide


    ------------------------------
    Davide Graziani
    Arval Service Lease
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources