Definition
- Instructions on how to handle user authentication in the messaging service based on user ID on a website or app
Usage
Zendesk Guide Document
Authenticate end users in messaging for Web Widget and Mobile SDK – MatrixCloud (zendesk.com)
Practical Guide
Creating and Sharing a Signature Key
- Replace with basic shared document
Requirements
- External_id of the end user is required
- The required element of jwt is external_id (Email is optional)
- External_id can only be entered when using the API or user upload
- That is, it can initially be processed by entering it in the CSV, but afterwards, the client company needs to call the Zendesk API to update the user's external_id when creating customers
- Help links
- Can be checked at the bottom of the profile
BackEnd Development Required
- Generate jwt token
- Node.js example
var jwt = require('jsonwebtoken'); var SECRET = 'Key generated from end user authentication' var KID = 'ID of the end user authentication' // Only scope and external_id are required var token = jwt.sign({ scope: 'user', external_id:'External ID', name: 'Username', email: 'User Email' }, SECRET, { header: { kid: KID } }); -
Element description
Enabling authenticated visitors for messaging with Zendesk SDKs
- Use the generated token for messaging login after loading the web widget on the front end
WebWidget
-
Channel → Messaging → Select Messaging → Install
- Place the code snippet in the client company's app
- Then, when the customer logs in, call the above BackEnd to obtain the JWT token
- Zendesk messaging login (possible after calling the above widget)
zE("messenger", "loginUser", function (callback) { callback("Enter the obtained token") }) - Zendesk messaging logout (possible after calling the above widget)
zE("messenger", "logoutUser") -
Guide
Bot
-
Check login status - branching by condition
-
Login information can be obtained from messaging metadata
Comments
0 comments
Please sign in to leave a comment.