Trivi API uses a bearer token based authentication. In order to use API resources, you must generate a authentication token.

Before you begin

  1. Go to, click Settings, Trivi settings and expand the API section
  2. Click Add new application and enter a name of your application
  3. Copy App Id and App Secret codes (click on it)


1. Send a request to the authentication endpoint

	"appId": "your_app_id",
	"appSecret": "your_app_secret"

2. You should get a following response

	"access_token": "your_access_token",
	"expires_in": 3600,
	"token_type": "Bearer",
	"refresh_token": "your_refresh_token"

3. All subsequent requests have to send Authorization header. See the minimum example request:

GET /v2/accountingdocuments HTTP/1.1
Authorization: Bearer your_access_token