When to use 'force' parameter?

The docs have a parameter I don’t understand:

force: boolean
Generates new auth token forcefully

I don’t know if I should set this to true or false.
In which cases would I want to generate a new auth token forcefully?

Please advise.

Thank you.

Hi @vcamp,

By default, the create authToken API returns:

  1. An existing authToken linked to the device from which the API call is made internally via CometChat SDK.
  2. An existing authToken that isn’t associated with any device.
  3. API creates a new authToken if the device doesn’t have any authToken associated with it as well as there isn’t any existing authToken with an empty device.

If you wish to create multiple authTokens for a user using the REST API, you can use force as true.

Hello @vcamp,

Hope this was helpful!
Please reach out to us at help@cometchat.com if you require any further assistance.

Thank you.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.