Authentication

The API uses Bearer tokens.

Authorization: Bearer YOUR_API_TOKEN

A token belongs to one VTC. Requests made with that token act on behalf of that VTC.

Check the current VTC

Use GET /me after obtaining a token.

curl https://api.eventthing.example/v1/me \
  -H "Authorization: Bearer YOUR_API_TOKEN"

A successful response returns the VTC and permissions attached to the token.

{
  "vtc": {
    "id": "vtc_8m1p2k",
    "name": "Example Logistics",
    "truckersmp_id": 12345
  },
  "permissions": [
    "events:read",
    "events:write",
    "invites:read",
    "invites:write"
  ]
}

Keep tokens private

API tokens should only be used by server-side applications and trusted integrations. Do not put them in frontend JavaScript or public source code.