PHPackages                             geotab/mygeotab-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. geotab/mygeotab-php

ActiveLibrary[API Development](/categories/api)

geotab/mygeotab-php
===================

Unofficial PHP client for the MyGeotab API

2.0.0(1y ago)4326.7k↓24.6%23[1 issues](https://github.com/Geotab/mygeotab-php/issues)MITPHPPHP &gt;=7.1.0

Since Mar 29Pushed 9mo ago6 watchersCompare

[ Source](https://github.com/Geotab/mygeotab-php)[ Packagist](https://packagist.org/packages/geotab/mygeotab-php)[ RSS](/packages/geotab-mygeotab-php/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (3)Versions (6)Used By (0)

MyGeotab PHP API Client
=======================

[](#mygeotab-php-api-client)

[![Packagist](https://camo.githubusercontent.com/df8b80746382c8a9227ba5d3a59fcee8195e4e831f692ffc8172607831ae704e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f67656f7461622f6d7967656f7461622d7068702e737667)](https://packagist.org/packages/geotab/mygeotab-php)

Provides a PHP client that can easily make API requests to a MyGeotab server.

Installation
------------

[](#installation)

You can use [composer](https://getcomposer.org/) and run the following command into your own repo:

```
composer require geotab/mygeotab-php

```

This repository requires PHP &gt;=7.1, but if you're going to try integrate this into older versions then you can look at the code in `src` directly.

Quick start
-----------

[](#quick-start)

```
$api = new Geotab\API("user@example.com", "password", "DatabaseName", "my.geotab.com");
$api->authenticate();

$api->get("Device", ["resultsLimit" => 1], function ($results) {
    var_dump($results);
}, function ($error) {
    var_dump($error);
});
```

Instead of using the callback syntax, you can simply use the return result directly. Keep in mind, if an error occurs you won't be informed! It will throw as a `MyGeotabException`, so remember to use try &amp; catch.

```
$toDate = new DateTime();
$fromDate = new DateTime();
$fromDate->modify("-1 month");

try {
    $violations = $api->get("DutyStatusViolation", [
        "search" => [
            "userSearch" => ["id" => "b1"],
            "toDate" => $toDate->format("c"),   // ISO8601, or could use "2018-11-03 00:53:29.370134"
            "fromDate" => $fromDate->format("c")
        ],
        "resultsLimit" => 10
    ]);
} catch (Exception $e) {
    // Handle this or return
}

echo "The driver has " . count($violations) . " violations!";
```

Contributing
------------

[](#contributing)

To build this repo, you should start by running:

```
composer update

```

Feel free to clone and open a new Pull Request with any suggested changes.

Examples
--------

[](#examples)

In the `examples` folder, you can see the "Top Speeding Violations" example that was presented in the [Dev Channel video](https://www.geotab.com/video/mygeotab-php-api-client/). You can use the PHP built-in web server to test out the example at `http://localhost:7000` by running:

```
php -S localhost:7000 -t examples/top-speeding-violations/web

```

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance45

Moderate activity, may be stable

Popularity43

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 98.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~808 days

Total

5

Last Release

490d ago

Major Versions

1.2.1 → 2.0.02025-02-04

PHP version history (2 changes)1.0.0PHP &gt;=5.3.3

1.1.0PHP &gt;=7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8283f82afba84cc17803f06e92b250c16f6245d619733e2c196ba269eacd948c?d=identicon)[colonelchlorine](/maintainers/colonelchlorine)

---

Top Contributors

[![colonelchlorine](https://avatars.githubusercontent.com/u/1085938?v=4)](https://github.com/colonelchlorine "colonelchlorine (54 commits)")[![symartensv2v](https://avatars.githubusercontent.com/u/102972677?v=4)](https://github.com/symartensv2v "symartensv2v (1 commits)")

---

Tags

apisdkgeotabmygeotab

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/geotab-mygeotab-php/health.svg)

```
[![Health](https://phpackages.com/badges/geotab-mygeotab-php/health.svg)](https://phpackages.com/packages/geotab-mygeotab-php)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.5M10](/packages/checkout-checkout-sdk-php)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[resend/resend-php

Resend PHP library.

596.2M34](/packages/resend-resend-php)[clicksend/clicksend-php

351.6M11](/packages/clicksend-clicksend-php)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

74287.1k1](/packages/mozex-anthropic-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
