New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

socialdept/atp-client

Type-safe AT Protocol HTTP client with OAuth 2.0 support for Laravel
2,898 2
Install
composer require socialdept/atp-client
Latest Version:v0.3.15
PHP:^8.3
Laravel:11 · 12 · 13
License:MIT
Last Updated:Nov 7, 2026
Links: GitHub  ·  Packagist
Maintainer: socialdept

AtpClient Header

Type-safe AT Protocol HTTP client with OAuth 2.0 support for Laravel.



This Laravel package talks to Bluesky and the AT Protocol. It signs users in with OAuth 2.0 (PKCE, PAR and DPoP) or app passwords, keeps their sessions refreshed, and gives you a typed API for posts, profiles, the social graph, feeds and raw repository writes. It also verifies service auth tokens and forwards XRPC calls to a user's PDS. To learn all about it, head over to the documentation.

Here are a few short examples of what you can do.

Sign in with an app password and post:

use SocialDept\AtpClient\Facades\Atp;

$client = Atp::login('yourhandle.bsky.social', 'your-app-password');

$client->bsky->post->create('Hello from Laravel!');

Send a user through OAuth:

$auth = Atp::oauth()->authorize('user.bsky.social');

return redirect($auth->url);

Act as a user whose session you stored:

$timeline = Atp::as($did)->bsky->feed->getTimeline(limit: 50);

Accept calls from other AT Protocol services:

Route::get('/xrpc/com.example.doThing', DoThingController::class)
    ->middleware('atp.service-auth:com.example.doThing');

Fake the client in tests:

Atp::fake();

Documentation

You'll find the documentation on https://socialde.pt/docs/atp-client.

Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving it? Feel free to create an issue on GitHub.

Testing

vendor/bin/phpunit

Changelog

Please see the changelog for recent changes.

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see the license file for more information.

Related Packages

directorytree/bartender

An opinionated way to authenticate users using Laravel Socialite.

26,567 285
laravel/socialite

Laravel wrapper around OAuth 1 & OAuth 2 libraries.

136,010,044 5,744
jenssegers/oauth

Laravel OAuth library based on Lusitanian/PHPoAuthLib

18,573 65
liaol/socialite-cn

Laravel wrapper around OAuth 1 & OAuth 2 libraries for Chinese Company.

1,961 47

Version History

Version Released PHP Laravel License
v0.3.15 ^8.3 ^11.0|^12.0|^13.0 MIT
v0.3.14 ^8.3 ^11.0|^12.0|^13.0 MIT
v0.3.13 ^8.3 ^11.0|^12.0|^13.0 MIT
v0.3.12 ^8.3 ^11.0|^12.0|^13.0 MIT
v0.3.11 ^8.3 ^11.0|^12.0|^13.0 MIT