cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
146
Views
5
Helpful
2
Replies
Highlighted

UCCX Script REST Call with Bearer token authentication

Hi, 

I'm trying to make an API call from a UCCX script to an external Server. This particular external server requires to obtain a tokent first from it and then make the API call using that token (Bearer Token authentication) to get data. 

This works well for Postman, but does not work with UCCX Script. 

I tried including a header called "Authorization" and set it's value to "Bearer" + Token value. But external API server rejects it with authentication failure. Attached the header screenshot also. Does anyone know how to use bearer token authentication with REST call step ? Any idea what might go wrong here ? UCCX Version - 12.0

Thank you. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

@SajithThrimavithana 
Have you looked at this post and the answer to it: Cisco Community Link . I think that you might be hitting the sane problem.

 

Another thing that might be useful in your case is to gather the entire request that is sent by UCCX and check what you see in headers - you can use a fake web server that only just logs the request headers and content to log file (quick job in ex Python, PHP).

Marek
Web: https://gaman-gt.com, Webex Teams: chat

View solution in original post

2 REPLIES 2
Highlighted

@SajithThrimavithana 
Have you looked at this post and the answer to it: Cisco Community Link . I think that you might be hitting the sane problem.

 

Another thing that might be useful in your case is to gather the entire request that is sent by UCCX and check what you see in headers - you can use a fake web server that only just logs the request headers and content to log file (quick job in ex Python, PHP).

Marek
Web: https://gaman-gt.com, Webex Teams: chat

View solution in original post

Highlighted

Hi, 

Thank you very much for the link. It was exactly the issue I was facing. With the points mentioned in that, I could get it working. 

Adding "" for username and password allowed to instruct REST call not to use Simple authentication, and adding "Authorization" header with bearer token made it possible to use token authentication. 

Capture.PNG

I'm not sure if authorization header added in this manner uses hashing for the password (I think it's base64), however in may case it works. 

Thanks again !

Content for Community-Ad