最近搜索


没有最近搜索

Chandra Iyer's Avatar

Chandra Iyer

已加入2021年12月10日

·

最后活动2021年12月10日

关注

0

关注者

0

活动总数

2

投票

0

订阅

1

活动概览

的最新活动 Chandra Iyer

Chandra Iyer 进行了评论,

评论Web 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

 

 

查看评论 · 已于 2021年12月10日 发布 · Chandra Iyer

0

关注者

0

投票

0

评论