Recent searches


No recent searches

Chandra Iyer's Avatar

Chandra Iyer

Joined Dec 10, 2021

·

Last activity Dec 10, 2021

Following

0

Followers

0

Total activity

2

Votes

0

Subscription

1

ACTIVITY OVERVIEW

Latest activity by Chandra Iyer

Chandra Iyer commented,

CommentWeb Widget (Classic) documentation

hi 

I managed to get to the first step of the webchat getting authenticated using 

1) the function 

 window.zESettings = {
                webWidget: {
                  authenticate: {
                    chat: {
                      jwtFn: function(callback) {
                        fetch('${BACKEND_JWT__API})
                        .then(response => {
                          if (!response.ok) {
                            throw new Error("HTTP error, status = " + response.status);
                          }
                          return response.json();
                        })
                        .then(resp => {
                    // console.log("$$$$$====>",resp)
                    callback(resp.data.token);
                         })
                        .catch(error => console.log('error', error));
                       }
                     }
                   }
                 }
               };
 
2) Using the secret from
  1. Settings > Widget > Widget Security tab.

The user is authenticated and I can verify this 1) 200 Token Response  from the api --> https://id.zopim.com/authenticated/web/jwt 2)  by seeing that the name and email are not editable in the chat box and 3) seeing messages come through the Live Chat. 

 

My problems:

a) Help Center  Setting does not require user sign in but user needs to be authenticated to view Restricted content. 

b) The Zendesk token from my above does not still give access to the Restricted help center content. 

Is there another step?

1) Do we need to call the code block on this page separately using the secret from https://{mydomian}.zendesk.com/admin/channels/classic/widget/ Security settings ? 

1a) Do we need to separately also call the Help Center reauthenticate function separately as referenced here --> https://developer.zendesk.com/api-reference/widget/settings/#authenticate

2) If we use this Help center content code block what happens to my existing code block for chat authentication ?  Can both of them co exist?

Sorry. I am finding the multitude of secrets and code blocks difficult to navigate.  

Any help would be appreciated !

 

Regards

 

 

View comment · Posted Dec 10, 2021 · Chandra Iyer

0

Followers

0

Votes

0

Comments