Enabling authenticated visitors in the integrated Web Widget

Return to top
Have more questions? Submit a request

69 Comments

  • CT

    I have two questions:

    - Where can I locate the external_id of visitors on dashboard?

    - How to set phone for authenticated visitor?

    Thank you!

     

     

    0
  • Devan - Community Manager
    Zendesk Community Team

    Hello CT,

    Welcome to the community! This article on Setting and finding user's external IDs should be able to answer your first question. As for your second question would you be able to elaborate on this please?

    Best regards. 

    0
  • CT

    Hi Devan,

     

    Thank you for your warm welcome.

     

    For the first question, I also read this article before I posted the comment, user info of each visitor on dashboard only shows:

    • Name
    • Email
    • Phone number
    • Visitor notes
    • Tags
    • Past visits
    • Past chats
    • Visitor path
    • Location
    • Browser
    • Platform
    • Device
    • IP address
    • Hostname
    • User agent

    But there isn’t external_id.

     

    For the second question, the payload of the current JWT token only accepts:

    • Name
    • Email
    • External_id
    • Iat
    • Exp

    And I would like to set phone number for each authenticated visitor as well, please give some example codes.

     

    Thanks you!

     

    0
  • Lila Kingsley

    Is there any relationship between the shared secret & brand?  We created our widget as chat only on one brand, but soon we will be moving to another brand which has our customer help center (so we can offer that in the widget as well).  Just wondering if there will be any impact to the shared secret with this upcoming change.

    0
  • Brett Bowser
    Zendesk Community Team

    Hey Lila,

    The shared secret is set up through the Chat dashboard which does not have multi-branding available. If you're switching the web-widget brand it should not affect your Chat shared secret you've generated.

    Let me know if you have any other questions!

    1
  • Larry Marshall

    While trying to configure Knowledge Center for the widget, I am getting a Bad Request response for the following URL in my browser console,
    https://listenfirst.zendesk.com/embeddable/authenticate
    HTTP Method: POST
    Response: {"error":"Bad request","message":"Invalid message(s): * Could not be verified"}


    This is my JWT Token Generation Snippet:
    hash = {
    email: 'mail-name@listenfirstmedia.com', name: 'Larry F',
    iat: Time.now.to_i, jti: rand(2 << 64).to_s,
    external_id: 'mail-name@listenfirstmedia.com'
    }
    jwt_token = JWT.encode(hash, $settings[:zendesk_jwt_secret], "HS256")

    I verified that this token works by loging in using https://listenfirst.zendesk.com/access/jwt?jwt=#{jwt_token}

    My zESettings is
    window.zESettings = {
    webWidget: {
    authenticate: {
    jwtFn: function(callback) {
    $.ajax({
    url: "http://localhost:4040/oauth/token/info",
    success: function success(t) {
    callback(t['zendesk_token']); // the code flow came here!!!
    },
    error: function error(e) {
    callback(null);
    }
    });
    }
    }
    }
    }

    Could you please help me fix or troubleshoot this further?

    0
  • Dineshswamy Paranthaman

    I embedded the widget in an Html page and using it as a webview in the app. The app authentication works perfectly but this happens when the user tries to start the chat again after ending




     

     

     

    0
  • Larry Marshall

    @Dineshswamy Paranthaman How would this configuration work if we want to configure only knowledge center but not chat? there is a configuration in this page that details it.. it seems to work similar to the documentation here.. https://developer.zendesk.com/embeddables/docs/widget/settings#help-center.. However it does not work.

    0
  • Vikas Shivananjappa

    Hi Ramin,

                    Thanks for the exlanation on using JWT. We have successfully enabled authentication using JWT. However zendesk chat web widget do not seem to respect the JWT token expiry date. Am i missing something here? 

     

    The JWT payload will look like below:

    { "email": "vshivananjappa@testme.io", "exp": 1600812308, "external_id": "vshivananjappa@testme.io", "iat": 1600812008, "jti": "ac5sas5d1-12fa-1649-9751-7abc4f7f96ad", "name": "vshivananjappa@testme.io" }

     

    0

Please sign in to leave a comment.

Powered by Zendesk