Latest Stable Version TYPO3 11 Total Downloads Monthly Downloads Continuous Integration Status

Introduction

This extension provides a client for the Bexio API by extending the client from the package onlime/bexio-api-client.

Usage

Following these steps to use the client:

  1. Carry out the setup as outlined in the administration manual

  2. Authenticate the usage by loading the authentication url (https://your-domain.ch/bexio-auth-your_challange). You will be redirected to the bexio authentication server.

  3. Get a client from the ApiService

    use Buepro\Bexio\Service\ApiService;
    
    // Get the ApiService with the GeneralUtility or by dependency injection
    $apiService = GeneralUtility::makeInstance(ApiService::class);
    // Initialize the service with the request and get a client
    $client = $apiService->initialize($serverRequest)->getClient();
    // Load the tokens obtained by the Bexio authentication server
    $client->loadTokens($apiService->getTokensFile());
    
  4. Use the client

    // @link https://github.com/onlime/bexio-api-client/tree/main/src/Bexio/Resource
    use Bexio\Resource\Contact
    
    $bexioContact = new Contact($client);
    $contacts = $bexioContact->getContacts();
    

Prerequisites

This extension requires a composer based installation.

Credits