PHPackages                             gimucco/atproto-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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. gimucco/atproto-php

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

gimucco/atproto-php
===================

AT Protocol OAuth 2.1 client for PHP — PKCE, DPoP, and PAR support for authenticating with Bluesky and other atproto services.

v0.2.2(1mo ago)1351GPL-2.0-or-laterPHPPHP &gt;=8.2CI passing

Since Apr 30Pushed 1mo agoCompare

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

READMEChangelog (6)Dependencies (11)Versions (7)Used By (1)

gimucco/atproto-php
===================

[](#gimuccoatproto-php)

**AT Protocol OAuth 2.1 client for PHP — PKCE, DPoP, and PAR support for authenticating with Bluesky and other atproto services.**

[![Latest Version](https://camo.githubusercontent.com/dd83054a3a65c38259856d5b6c8ce37ae16cd4351c33a079390c55644a78783e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67696d7563636f2f617470726f746f2d7068702e737667)](https://packagist.org/packages/gimucco/atproto-php)[![PHP Version](https://camo.githubusercontent.com/f040b43fa496f3f30ae7baba0f50c27151d21b50e9ea87e40f7dcc2c996f961d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f67696d7563636f2f617470726f746f2d7068702e737667)](https://packagist.org/packages/gimucco/atproto-php)[![License](https://camo.githubusercontent.com/7a6d681d756ef188dc7926d53e434f59c82f50fce46c4bd34cdb1f6186a69fa6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f67696d7563636f2f617470726f746f2d7068702e737667)](https://github.com/gimucco/atproto-php/blob/main/LICENSE)[![CI](https://github.com/gimucco/atproto-php/actions/workflows/ci.yml/badge.svg)](https://github.com/gimucco/atproto-php/actions/workflows/ci.yml)

---

What this is (and isn't)
------------------------

[](#what-this-is-and-isnt)

This library handles **OAuth 2.1 authentication** with any AT Protocol Personal Data Server (PDS). It gives you an authenticated session you can use to make API calls.

**This is OAuth only.** It does not implement Bluesky-specific operations like posting, fetching feeds, or managing profiles. For that, see the companion library [gimucco/bluesky-php](https://github.com/gimucco/bluesky-php).

Why use this
------------

[](#why-use-this)

Existing PHP libraries for AT Protocol only support the deprecated App Password flow. App Passwords are being phased out. The AT Protocol mandates a strict OAuth 2.1 profile that combines several features most OAuth libraries don't handle together:

- **PKCE** (S256 only) — Proof Key for Code Exchange
- **DPoP** — Demonstrating Proof of Possession, with mandatory server-issued nonces
- **PAR** — Pushed Authorization Requests
- **`private_key_jwt`** — Client authentication via signed JWTs
- **Decentralized discovery** — Handle → DID → PDS → Authorization Server

This library handles all of it.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Extensions: `json`, `curl`, `openssl`, `sodium`
- A PSR-18 HTTP client (Guzzle recommended)
- An HTTPS domain where you can host two JSON files (client metadata and JWKS)

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

[](#installation)

```
composer require gimucco/atproto-php

# Recommended: Guzzle as the HTTP client
composer require guzzlehttp/guzzle
```

Quickstart
----------

[](#quickstart)

```
