PHP code example of woeler / komoot-php

1. Go to this page and download the library: Download woeler/komoot-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

woeler / komoot-php example snippets


use Woeler\KomootPhp\Api\Komoot;

// Create the api object
$api = new Komoot('[email protected]', 'my-komoot-password');

// Execute the login
$api->login();

// ... You can now start making api calls

// Get a single tour
$api->getTour(123);

// Get a single tour as GPX data
$api->getTourGpx(123);

// Get all tours of your account
$api->getAllTours();

// Get a single user
$api->getUser(123);

// Get a single collection
$api->getCollection(123);

$api->customRequest('https://api.komoot.de/v007/some-other-endpoint', [], 'GET');