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

getCookie function in Finesse

akit_cisco
Level 1
Level 1

I'm trying to create a button on finesse agent desktop to Pause and Resume media sense recording.

I'm up to the point where I need to get a cookie from finesse.

In the Finesse Javascript library I can see a getCookie function

I need to get the JSESSIONID cookie after an api call from Finesse to Mediasense.

I tried calling the function using

var cookievar = getCookie("JSESSIONID");

but it gives error :

Uncaught ReferenceError: getCookie is not defined

Do i need to copy this function and put it into my own javascript file? or will it recognise the function from finesse.js?

The purpose of getting the JSESSIONID is to use it in the next api call which will be a getSessions to media sense to get the sessionid for the agent's session with media sense.

Once I have the sessionid, I can then make the api call to pause and resume the recording on media sense from finesse.


Can anyone provide any advice on how to get the cookie, and then into a variable?

1 Reply 1

akit_cisco
Level 1
Level 1

I did end up finding a solution to this.

I used the DOM to get all cookies.

Turns out the cookie is not called JESSIONID is actually called JSESSIONIDSSO when using chrome.