최근 검색


최근 검색 없음

Adam Cunliffe's Avatar

Adam Cunliffe

가입한 날짜: 2021년 11월 17일

·

마지막 활동: 2021년 11월 25일

팔로잉

0

팔로워

0

총 활동 수

4

투표 수

0

가입 플랜

1

활동 개요

님의 최근 활동 Adam Cunliffe

Adam Cunliffe님이 에 댓글을 입력함

커뮤니티 댓글 Developer - Zendesk APIs

Hi Christopher Kennedy, do you have any update on this? Is there any way of getting at logging information about why the error might have been returned?

 

Thanks

댓글 보기 · 2021년 11월 25일에 게시됨 · Adam Cunliffe

0

팔로워

0

투표 수

0

댓글


Adam Cunliffe님이 에 댓글을 입력함

커뮤니티 댓글 Developer - Zendesk APIs

And in case you're asking about the server-side JWT generation, here's that too:

// C#

private string GenerateWebToken(byte[] keyBytes, string userEmail)
{
var tokenHandler = new JwtSecurityTokenHandler();

SecurityToken token = tokenHandler.CreateToken(new SecurityTokenDescriptor
{
Subject = new ClaimsIdentity(new[]
{
new Claim("name", userEmail)),
new Claim("email", userEmail)),
new Claim("external_id", userEmail)),
},
IssuedAt = DateTime.UtcNow,
Expires = DateTime.UtcNow.AddMinutes(5),
SigningCredentials = new SigningCredentials(
new SymmetricSecurityKey(keyBytes),
SecurityAlgorithms.HmacSha256Signature)
});

return tokenHandler.WriteToken(token);
}

Thanks very much for your help!

댓글 보기 · 2021년 11월 19일에 게시됨 · Adam Cunliffe

0

팔로워

0

투표 수

0

댓글


Adam Cunliffe님이 에 게시물을 만듦

게시물 Developer - Zendesk APIs

Hi,

I am having trouble getting Authentication working for the chat widget according to these instructions: https://support.zendesk.com/hc/en-us/articles/4408838925082

I have configured the chat widget to request authentication tokens, and they are indeed being requested from our API and sent on to the authentication endpoint.

However, the call to embeddable/authenticate that the widget makes after obtaining the token is always failing with status code 403 and error response:

{"error":"Forbidden","message":"Secret invalid"}

I have verified that the secret being used for JWT generation is correct, and the JWT itself looks valid when using the debugger on jwt.io. It also contains the payload specified by the above article:


At this point I'm not sure what else to try - could you provide any guidance?

2021년 11월 17일에 편집됨 · Adam Cunliffe

0

팔로워

5

투표 수

7

댓글