{"id":38103200,"url":"https://github.com/gpsinsight/api-v2-client-php","last_synced_at":"2026-01-16T21:22:54.090Z","repository":{"id":56983370,"uuid":"64897962","full_name":"gpsinsight/api-v2-client-php","owner":"gpsinsight","description":"Official GPS Insight API V2 Client Library for PHP provided for GPS Insight customers","archived":false,"fork":false,"pushed_at":"2020-04-04T00:51:54.000Z","size":70,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-11-27T15:08:14.765Z","etag":null,"topics":["api-client","fleet-tracking","gps","gps-insight","guzzle","php"],"latest_commit_sha":null,"homepage":"http://www.gpsinsight.com/apidocs","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gpsinsight.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-04T03:08:37.000Z","updated_at":"2020-07-29T21:52:05.000Z","dependencies_parsed_at":"2022-08-21T12:20:20.107Z","dependency_job_id":null,"html_url":"https://github.com/gpsinsight/api-v2-client-php","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gpsinsight/api-v2-client-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpsinsight%2Fapi-v2-client-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpsinsight%2Fapi-v2-client-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpsinsight%2Fapi-v2-client-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpsinsight%2Fapi-v2-client-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpsinsight","download_url":"https://codeload.github.com/gpsinsight/api-v2-client-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpsinsight%2Fapi-v2-client-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","fleet-tracking","gps","gps-insight","guzzle","php"],"created_at":"2026-01-16T21:22:53.577Z","updated_at":"2026-01-16T21:22:54.075Z","avatar_url":"https://github.com/gpsinsight.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GPS Insight API Client Library for PHP\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Build Status][ico-travis]][link-travis]\n\nThis is the official PHP client library for interacting with the **GPS Insight API (V2)**.\n\n[![GPS Insight logo](http://www.gpsinsight.com/apidocs/images/gpsi_logo_flat.png)][gps-insight]\n\n[GPS Insight][gps-insight] provides vehicle fleet GPS tracking and FMCSA-compliant electronic logging devices (ELD)\nfor regulating hours of service (HOS). GPS Insight's API (V2) provides a programmatic way to push your fleet's data\nfrom our system to your back-end systems (e.g., ERP, Dispatch, CRM). By using our API you can effortlessly integrate\nyour fleet's data into your back-end systems to provide transparency into payroll, fuel card transactions, additional\ndocumentation, asset management, and more.\n\nThe [GPS Insight API documentation][gps-apidocs] is hosted on our website. Be sure to sign up\nfor an account and follow the directions to get API credentials before using this library.\n\n## Installation\n\nThis package is hosted on [Packagist][link-packagist] and is installable via [Composer][link-composer].\n\n### Requirements\n\n- PHP version 5.5 or greater (5.6+ recommended)\n- Composer (for installation)\n- [Guzzle][guzzle-docs] is installed automatically as a dependency and requires one of the following to\n  make HTTP requests:\n    - A recent version of cURL (minimum 7.19.4) compiled with OpenSSL and zlib.\n    - Enable `allow_url_fopen` in your system's `php.ini`.\n\n### Installing Via Composer\n\nRun the following command (assuming `composer` is available in your PATH):\n\n```bash\n$ composer require gpsinsight/api-v2-client\n```\n\nThis will set the **GPS Insight API Client Library** as a dependency in your project and install it.\n\nWhen bootstrapping your application, you will need to require `'vendor/autoload.php'` in order to setup autoloading\nfor the GPS Insight API Client Library and any of your other Composer-installed packages.\n\n## Basic Usage\n\n### Code\n\n```php\nuse GpsInsight\\Api\\V2\\GpsInsight;\n\n// Create and configure an SDK object\n$gpsInsight = new GpsInsight([\n    'username'  =\u003e 'johndoe3000',\n    'app_token' =\u003e '490f5ed342ca8',\n]);\n\n// Call the \"create\" method of the \"driver\" service\n// Note: API authentication is applied automatically by the client library\n$result = $gpsInsight-\u003edriver-\u003ecreate([\n    'lastname' =\u003e 'Lindblom',\n    'firstname' =\u003e 'Jeremy',\n    'email' =\u003e 'jlindblom@example.com',\n    'timezone' =\u003e 'US/Arizona',\n]);\n\nprint_r($result-\u003egetData());\n```\n\n### Output\n    \n```\nArray\n(\n    [id] =\u003e 4551485\n    [message] =\u003e Driver added\n)\n```\n\n## Additional Usage\n\nIf you are using an IDE like PhpStorm that supports intellisense, the names of services and operations will\nautocomplete for you. For parameters, you should consult the official [GPS Insight API documentation][gps-apidocs].\n\n## Concepts\n\n### Classes\n\nAll classes are in the root namespace of `GpsInsight\\Api\\V2`.\n\n- `GpsInsight` – The starting point to the library (as seen above in the example). Users can access the various\n  available services via readonly, intellisense-ready properties (e.g., `$gpsInsight-\u003edriver`, `$gpsInsight-\u003elandmark`)\n- `ServiceClient` – Encapsulates APIs for a particular service (e.g., `$gpsInsight-\u003edriver-\u003ecreate()`)\n- `Client` – A `guzzlehttp/command`-powered client that is used by the `GpsInsight` and various `ServiceClient`\n  classes\n- `Result` – An `ArrayAccessible` object that encapsulates the parsed data from an API response. It is returned as the\n  result of any API call (e.g., `$result = $gpsInsight-\u003edriver-\u003ecreate(); echo $result['message'];`)\n- `Services` – A class containing the list of valid services names\n- `Middleware` – The `Middleware` directory contains `guzzlehttp/command` middleware that are used to perform\n  transformations on the command or result prior to them being serialized to a request or response. For example, auth\n  is handled via a middleware, as is applying an app channel.\n  \n### Configuration\n\nWhen instantiating the `GpsInsight` class, you must provide configuration options to setup the API client. The\nfollowing settings are allowed:\n\n- **app_token** (`string`, _conditionally required\u003csup\u003e †\u003c/sup\u003e_) – GPS Insight API \"App Token\", which acts as a credential for\n  a specific application\n- **channel** (`string`, _recommended_) – An identifier to tag your requests with for your application. You can then\n  retrieve stats about your application's API usage with the [channel APIs][gps-apidocs-channel]\n- **endpoint** (`string`, _optional_) – Base URL endpoint for accessing the GPS Insight API. Defaults to the\n  production GPS Insight API endpoint: \"https://api.gpsinsight.com\"\n- **http_handler** (`callable`, _optional_) – Custom or shared Guzzle HTTP handler. See docs for `handler` in the\n  [Guzzle documentation for \"Creating a Client\"][guzzle-docs-handler]\n- **http_options** (associative `array`, _optional_) – A set of Guzzle HTTP request options. See docs for\n  [Request Options in the Guzzle Documentation][guzzle-docs-requestopts]\n- **password** (`string`, _conditionally required\u003csup\u003e †\u003c/sup\u003e_) – GPS Insight API account password\n- **session_token** (`string`, _conditionally required\u003csup\u003e †\u003c/sup\u003e_) – GPS Insight API \"session token\"\n- **token_cache** (`TokenCacheInterface`, _recommended_) – A token cache for storing/retrieving session tokens.\n- **username** (`string`, _required_) – GPS Insight API account username\n- **version** (`string`, _recommended_) – A version number to tag your requests with for your application. Use\n  this with in combination with `channel`\n- **wire_log** (`bool|LoggerInterface`, _optional_) – Use this to enable wire logging for debugging purposes. Set to\n  `true` for the default logger that writes to `STDOUT`, or provide a PSR-3 compliant `LoggerInterface`\n  \n\u003csup\u003e†\u003c/sup\u003e You must provide at least one of `app_token`, `password`, or `session_token` along with your `username`\nto authenticate to the GPS Insight API. For more information about API credentials, please read the\n[GPS Insight API documentation][gps-apidocs].\n\n#### Advanced Example\n\n```php\nuse GpsInsight\\Api\\V2\\GpsInsight;\nuse GpsInsight\\Api\\V2\\TokenCache\\CallbackCache as TokenCallbackCache;\n\n// Create and configure an SDK object\n$gpsInsight = new GpsInsight([\n    'username'  =\u003e 'johndoe3000',\n    'app_token' =\u003e '490f5ed342ca8',\n    'channel' =\u003e 'my_custom_app',\n    'version' =\u003e '2.10.1',\n    'token_cache' =\u003e new TokenCallbackCache(\n        function ($key) {\n            return isset($_SESSION['gpsinsight_tokens'][$key])\n                ? $_SESSION['gpsinsight_tokens'][$key]\n                : null;\n        },\n        function ($key, $token) {\n            $_SESSION['gpsinsight_tokens'][$key] = $token;\n        }\n    ),\n]);\n```\n  \n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security\n\nIf you discover any security related issues, please email websecurity@gpsinsight.com directly instead of using the\nissue tracker. This allows us to take appropriate actions to mitigate the issues as quickly as possible.\n\n## Credits\n\n- [Jeremy Lindblom](https://github.com/jeremeamia)\n- [Jennifer Dearing](https://github.com/jdearing11)\n- [Grant Anderson](https://github.com/pendenga)\n- [Drew LeSueur](https://github.com/drewlesueur)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/gpsinsight/api-client.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/gpsinsight/api-v2-client-php/master.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/gpsinsight/api-client\n[link-travis]: https://travis-ci.org/gpsinsight/api-v2-php-client\n[link-composer]: https://getcomposer.org/\n\n[gps-insight]: http://www.gpsinsight.com/\n[gps-apidocs]: http://www.gpsinsight.com/apidocs/\n[gps-apidocs-channel]: http://www.gpsinsight.com/apidocs/#/service/channel\n\n[guzzle-docs]: http://docs.guzzlephp.org/\n[guzzle-docs-handler]: http://docs.guzzlephp.org/en/latest/quickstart.html#creating-a-client\n[guzzle-docs-requestopts]: http://docs.guzzlephp.org/en/latest/request-options.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpsinsight%2Fapi-v2-client-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpsinsight%2Fapi-v2-client-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpsinsight%2Fapi-v2-client-php/lists"}