How to initiate livechat widget with previous registered customer_id(entity_id) in incognito browser

I have been researching through the documentation from your side. I found that
Authorization part Cookie grant

(for existing customer have pass the entity_id)
to identify that is the existing customer, but may I know how can I pass the entity_id with previous registered customer in incognito mode?
Is this got related with

? I got try this method with pass entity_id in getToken but is not working.
Your answer is really appreciated~


In case that you would like to pass over the identity to Incognito or, better yet, different devices or a different browser, you will need to get familiar with the Custom Identity Provider that you have linked in the initial message.

You should also get familiar with the following section of the Authorization docs at LiveChat: → this token grant will allow you to generate an identity transfer token and then exchange it for the access_token , so that it’ll be later used on a different browser/device (or in Incognito mode).

Let me know if that helps! :star:

Hi, thanks for the reply Lukasz. I 'm currently working fine with Custom Identity Provider section which can gettoken and display out the livechat widget successfully, but during the gettoken how can i use grant_type: cookie with passing the entity_id to get the token ya?

I have fork my simple example at here.

Hello, sorry for the delay,
To get the Chat Widget Token, you need to implement a function that calls the endpoint. You can do it either by checking out our documentation related to the Cookie grant that will tell you how to use a cookie grant when it comes to creating new customers or generating tokens for already existing customers . Here’s a link to the aforementioned part of the documentation that will allow you to get the token for the specific entity_id : also have got a ready-made example that will show you how to prepare an app that will call the customer/token endpoint, with the use of grant_type: 'cookie' type of authorization. Here it is: identity-provider-example/get-customer-token.ts at master · livechat/identity-provider-example · GitHub

Let me know if that helps!