최근 검색


최근 검색 없음

webmaster groupgia's Avatar

webmaster groupgia

가입한 날짜: 2023년 2월 13일

·

마지막 활동: 2023년 2월 13일

팔로잉

0

팔로워

0

총 활동 수

2

투표 수

0

가입 플랜

1

활동 개요

님의 최근 활동 webmaster groupgia

webmaster groupgia님이 에 댓글을 입력함

댓글Setting up Zendesk Chat

Hello good morning,

I am trying to send all the information to the chat but it does not work, I access the intranet from another computer and the history appears empty starting a new conversation

The code is the following:

 window.zESettings = {
                webWidget: {
                authenticate: {
                    chat: {
                    jwtFn: function(callback) { 
                        fetch(localStorage["ChatToken"]).then(function(res) {
                            res.text().then(function(jwt) {
                            callback(jwt);
                            });
                        });
                        }
                    } 
                    }
                }
            };



And the code on the server is the following:

$payload = [
                    'name' => $nombrecliente ,
                    'email' => $email,
                    'external_id' => $ID,
                    'iat' => time(),
                    'nbf' => 1357000000
                ];

                $key = '**';
    
                
                /**
                 * IMPORTANT:
                 * You must specify supported algorithms for your application. See
                 * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40
                 * for a list of spec-compliant algorithms.
                 */
                $jwt = JWT::encode($payload, $key, 'HS256');

This should make our client see his chat history when accessing the intranet, is that correct?

 

댓글 보기 · 2023년 2월 13일에 게시됨 · webmaster groupgia

0

팔로워

0

투표 수

0

댓글