PHPackages                             manujoz/iracing-api-sdk-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. manujoz/iracing-api-sdk-php

ActiveLibrary[API Development](/categories/api)

manujoz/iracing-api-sdk-php
===========================

Zero-dependency iRacing OAuth2 + Data API SDK for PHP (extractable).

v1.1.0(4mo ago)320MITPHPPHP &gt;=8.3CI failing

Since Jan 24Pushed 4mo agoCompare

[ Source](https://github.com/manujoz/iracing-api-sdk-php)[ Packagist](https://packagist.org/packages/manujoz/iracing-api-sdk-php)[ Docs](https://github.com/manujoz/iracing-api-sdk-php)[ RSS](/packages/manujoz-iracing-api-sdk-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

🏁 iRacing API SDK (PHP)
=======================

[](#-iracing-api-sdk-php)

**Zero-dependency PHP SDK for iRacing OAuth2 Authentication &amp; Data API**

[![PHP](https://camo.githubusercontent.com/127f931617fd20a650fa1c1b7983ac18303f3e8ebe5faf4de8557b28967786f3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e332d3737374242343f7374796c653d666c6174266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://www.php.net/)[![Composer](https://camo.githubusercontent.com/ac50aa9b83b0e5e2c41cecacc9f3e2e99b7899eff6fd5f0274c7b678317b9e0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6d706f7365722d7061636b6167652d3838353633303f7374796c653d666c6174266c6f676f3d636f6d706f736572266c6f676f436f6c6f723d7768697465)](https://getcomposer.org/)[![License](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](LICENSE)

**⭐ If you find this project useful, please give it a star! ⭐**

[📖 Documentation](./docs/README.md) • [🚀 Examples](./examples/README.md) • [🔒 Security](./docs/security.md) • [🤝 Contributing](CONTRIBUTING.md)

---

🎯 What is this?
---------------

[](#-what-is-this)

`iracing-api-sdk-php` is a **zero-dependency** PHP SDK that provides primitives for:

- **OAuth2 Authentication**: Password Limited, Authorization Code + PKCE, token refresh
- **Data API Client**: Access to iRacing's Data API (with typed generated services)
- **Session Management**: List and revoke OAuth2 sessions
- **Security First**: Credential masking, safe auth header forwarding, secure file caches

It is framework-agnostic by design: you bring your own logger and storage, while the library focuses on secure OAuth flows, token handling, and HTTP interactions.

---

✨ Features
----------

[](#-features)

- ✅ **Zero runtime dependencies** - Pure PHP at runtime
- ✅ **Security built-in** - Never logs secrets, credential masking utilities
- ✅ **OAuth2 complete** - Password Limited, Authorization Code + PKCE, token refresh
- ✅ **Typed services** - Generated service wrappers under `IracingApiSdk\Data\Services\*`
- ✅ **Flexible storage** - File-based storage + interfaces for custom implementations
- ✅ **Production friendly** - Explicit error handling, rate limit utilities, and tests

---

📦 Installation
--------------

[](#-installation)

```
composer require manujoz/iracing-api-sdk-php
```

---

🚀 Quick Start
-------------

[](#-quick-start)

### 1. Configure Environment

[](#1-configure-environment)

Create a local `.env` from `.env.example` and set your iRacing OAuth credentials.

```
cp .env.example .env
```

### 2. Authenticate &amp; Access Data

[](#2-authenticate--access-data)

The repository ships runnable CLI examples. Recommended first run:

```
php examples/10-auth-password-limited.php
php examples/20-data-car-get.php
```

Minimal bootstrap (same classes used by the examples):

```
