TSGGLOBAL Support sign in
Skip to page content
Browse TNID API docs

TNID API documentation Company User events Create user event token

Create user event token

On this page

HTTP API POST /auth/user-event-token

Mints the event_token a partner application's frontend sends to createUserEvent and userEvents, so it can record and read events about one user under the event type prefix TNID granted the company (e.g. hoozit.*).

Call it from your backend, authenticated as your company, with the TNID id of the signed-in user. The token is valid for an hour, for any number of requests made with that user's session; a request made as anyone else is refused. A company whose user events are not enabled by TNID is refused with a 400.

Request

{
  "user_id": "00000000-0000-4000-8000-000000000001"
}

Response

HTTP Response Code: 200

{
  "event_token": "eyJERAMPLE.PAYLOAD1.SIGNATURE",
  "expires_at": "2026-01-15T09:00:00Z"
}