02-17-2017 10:17 AM
Hi,
I have a finesse gadget that needs to get a call variable from a dialog using the url /finesse/api/User/<user_id>/Media/<media_id>/Dialogs.
My question is - will the finesse desktop take care of the user authentication meaning I only have to perform a get request in my gadget code.
Thanks
Sylvester
Solved! Go to Solution.
02-21-2017 02:17 PM
Hi Sylvester,
Looking at the JsDoc, I see:
Based off of the description of the onChange, it should fire when there is a change with the dialog. Also, there is an onAdd and onDelete handler which should handle the added or deleted scenario.
Thanx,
Denise
02-17-2017 11:09 AM
Hi Sylvester,
If you are trying to call the API from a Finesse gadget, you can actually use the JavaScript API from the finesse.js which will handle the authentication: JsDoc Reference - finesse.restservices.User
But, to directly answer your question, it depends on how you are calling the REST API. If it is with gadgets.io.makeRequest, then you will have to do your own authentication. If it is with the finesse.js's clientservices, then you do not. I don't see the clientservices make request documented, but if you open the finesse.js file itself, you can see the methods.
Thanx,
Denise
02-20-2017 03:33 PM
Hi Denise,
Thx for reply.
Id like to use the API Finesse Gadget. In the above URL example, do i call getMediaList or getMediaDialogs - JsDoc Reference - finesse.restservices.MediaDialogs
I am trying to access a variable that is assigned to a non-chat media dialog.
Thx
Sylvester
02-21-2017 07:51 AM
Hi Denis,
I was able to successfully grab the callVariable, thx for help.
Just one further question - does an 'onChange' event for getMedia fire when there is a change with in the MediaDialog - for example a state change, of does it only fire when a new Dialog is added or deleted.
We would like to monitor state.
Thx
Sylvester.
02-21-2017 02:17 PM
Hi Sylvester,
Looking at the JsDoc, I see:
Based off of the description of the onChange, it should fire when there is a change with the dialog. Also, there is an onAdd and onDelete handler which should handle the added or deleted scenario.
Thanx,
Denise
02-22-2017 09:23 AM
Thanks for your help Denise..
Ill look into the onload further and you can close the thread.
Thanks again
Sylvester.
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