TIM4biz API support and sample code

The TIM4biz API allows developers to create applications that access your TIM4biz call accounting account. The TIM4biz API definitions are described on the TIM4biz API homepage at https://tim4biz.com/api/.

Authorization

Access to the TIM4biz APIs requires a TIM4biz account, product license and an API access enabled username.

API calls require a bearer token. This bearer token can be created below for inclusion in your application and can be created for testing on the API definition page.

The bearer token created is tied to your TIM4biz username and expires with your password.

Create bearer token

TIM4biz username / client_id
TIM4biz password / client_secret

 

TIM4biz API bearer token

On the API definition page each method allows you to test it with a Try it out button. Before you can test the APIs you must authorize on that page. The bearer token created is the same one created above and will be displayed in the generated code.

  1. Go to https://tim4biz.com/api/
  2. Click the green Authorize button on the right.
    The Available authorizations window is displayed.
  3. Enter your TIM4biz username in client_id
  4. Enter your TIM4biz password in client_secret
  5. Click the green Authorize button
    If authorized a green Logout and a black Close button will appear.
  6. Click the Close button.

When you have finished testing the methods click the Authorize button and click Logout.

Rate limits

The TIM4biz API has a rate limit based on the accumulated number of calls a company can make per 60 minutes. The default value can be increased if required.

Response headers

TIM4biz API responses include headers that provide you with your rate limit status.

  1. TIM4biz-Rate-Limit-Limit: The configured number of calls per 60 minutes
  2. TIM4biz-Rate-Limit-Remaining: The number of calls remaining before hitting the rate limit

Rate limited

If your application reaches the rate limit your application will receive an HTTP 429 response.

API example calls

The TIM4biz API definitions are described on the TIM4biz API homepage at https://tim4biz.com/api/.

A simple TIM4biz API call is demonstrated below. Alternatively you can use the Swagger Editor to create a class library to access TIM4biz API.

Simple .NET C# example

Simple .NET C# code demonstrating making a call to the ExtensionTotal method. Replace the bearer token YOURBEARERTOKEN with your token.

Swagger generated class library example

The Swagger Editor at https://editor.swagger.io/ can be used to generate a class library to access TIM4biz API.

  1. Under the title on the TIM4biz API page at https://tim4biz.com/api/ is a link to the TIM4biz API JSON definition. Click on that link to open the TIM4biz API JSON definition.
    The TIM4biz API JSON definition is displayed.
  2. Open the Swagger Editor at https://editor.swagger.io/.
  3. Copy the contents of the TIM4biz API JSON file and paste it into the left pane of the Swagger Editor.
    There maybe a popup window ask if you wish to convert JSON to YAML, select OK. The TIM4biz API is loaded into the right pane.
  4. At the top of the window select Generate Client and select your target language.
    A download is produced, for example, csharp-client-generated.zip, save it to your computer.
  5. Add the IO.Swagger generated class library to your project and call the generated APIs.
  6. .NET C# code demonstrating making a call to the ExtensionTotal method via the Swagger generated library. Replace the bearer token YOURBEARERTOKEN with your token.