id- AgentView idexternalId- unique user id from host platform (for example Shopify), so that you can easily match userstoken- user’s secure authentication token
Create user
You can create user manually usingav.createUser
Update user
You can update user manually usingav.updateUser
Get user
You can fetch user by using id, external id or token:Creating Sessions for specific user
You can create a session for a particular user:Narrowing down scope
It you initiateAgentView client with API Key, this API Key grants you access to all the users:
av.getSession or av.createSession as a specific user, and if user doesn’t have permissions to the specific session or creating new one, the operation should throw an error. This provides a great security layer for your Agent Endpoint.
It’s possible to do it by scope narrowing by using as method of AgentView class:
as adds X-User-Token header to the API request with the user’s token to scope the request to the specific user.