Create JWT token

Generate a JWT token

Details

Generate a JWT token with a POST call to https://<serverUrl>/api/v2/tokens/khorosapi/ownerId/{ownerId} where:

  • ownerId is the owner of the token (this is the appId provided in the registration payload).
  • <serverUrl> is the URL to your Khoros Care environment (e.g., .response.lithium.com)

This call requires Basic authentication using a Khoros Care user account with the Bot API role. In your production environment, we recommend using a service account user with an email address not tied to a specific person.

The token expires after the date (expiresAtMillis) present in the response (90 days from when it was issued) and you must refresh prior to this expiration for uninterrupted service. This endpoint is intended for token creation only. Once the token is generated, a second call to this endpoint will result in a 409.

Tip: You may check if a token for the bot already exists via a GET to the same endpoint. This may be helpful when troubleshooting a 409 response.

Note: JWTs provided by Khoros during Early Access will NOT be invalidated when you create one specific to your appId. You can continue using the Khoros-provided JWT until it expires (90 days after you received it from Khoros), but we recommend generating the new token (calling https:///api/v2/tokens/khorosapi/ownerId/ownerId) before the 90 day expiration to ensure a smooth transition.

Related endpoints

ActionEndpoint
GET/tokens/khorosapi/ownerId/{ownerId}
Return whether a JWT exists for an entity
PUT/bots/v3/tokens/appId/{appId}
Refresh the JWT used to authenticate calls to the Bot v3 API
DELETE/bots/v3/tokens/appId/{appId}
Invalidate the JWT used to authenticate calls to the Bot v3 API
Language
URL