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

Finesse CORS with Dialogs

chunhsuchen
Level 1
Level 1

Hi:

I need to make Finesse calls for an UI app and I am getting CORS problem.

My calls with User API worked.

PUT https://uccx01.com:8445/finesse/api/User/myUserName

Content-Type: application/xml

Authorization: Basic abcdefghijklmnopq -- this is base64 encoded username/password

     <User><state>LOGIN</state><extension>7748</extension></User>


But my Dialog api call failed.  This is my MakeCall.

POST https://uccx01.com:8445/finesse/api/User/myUserName/Dialogs

Content-Type: application/xml

Authorization: Basic abcdefghijklmnopq -- this is base64 encoded username/password

    <Dialog><requestedAction>MAKE_CALL</requestedAction><fromAddress>7748</fromAddress><toAddress>7746</toAddress></Dialog>


The error message is:

Failed to load https://uccx01.com:8445/finesse/api/User/myUserName/Dialogs: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 401.


I tried including Origin in the above header but still got the same error.

Origin : http://localhost

Any help appreciated. Thanks

1 Reply 1

chunhsuchen
Level 1
Level 1

I found my problem. My requestOption was not correctly set. Please ignore this question.