socialdept / atp-client
Type-safe AT Protocol HTTP client with OAuth 2.0 support for Laravel
Requires
- php: ^8.3
- ext-fileinfo: *
- firebase/php-jwt: ^7.0
- guzzlehttp/guzzle: ^7.0|^8.0
- illuminate/http: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- phpseclib/phpseclib: ^3.0
- socialdept/atp-schema: ^0.4.9
- socialdept/atp-support: ^0.3.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.89
- mockery/mockery: ^1.6
- orchestra/testbench: ^9.0|^10.0|^11.0
- phpunit/phpunit: ^11.0|^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v0.3.15
- v0.3.14
- v0.3.13
- v0.3.12
- v0.3.11
- v0.3.10
- v0.3.9
- v0.3.8
- v0.3.7
- v0.3.6
- v0.3.5
- v0.3.4
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- v0.0.60
- v0.0.59
- v0.0.58
- v0.0.57
- v0.0.56
- v0.0.55
- v0.0.54
- v0.0.53
- v0.0.52
- v0.0.51
- v0.0.50
- v0.0.49
- v0.0.48
- v0.0.47
- v0.0.46
- v0.0.45
- v0.0.44
- v0.0.43
- v0.0.42
- v0.0.41
- v0.0.40
- v0.0.39
- v0.0.38
- v0.0.37
- v0.0.36
- v0.0.35
- v0.0.34
- v0.0.33
- v0.0.32
- v0.0.31
- v0.0.30
- v0.0.29
- v0.0.28
- v0.0.27
- v0.0.26
- v0.0.25
- v0.0.24
- v0.0.23
- v0.0.22
- v0.0.21
- v0.0.20
- v0.0.19
- v0.0.18
- v0.0.17
- v0.0.16
- v0.0.15
- v0.0.14
- v0.0.13
- v0.0.12
- v0.0.11
- v0.0.10
- v0.0.9
- v0.0.8
- v0.0.7
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
This package is auto-updated.
Last update: 2026-11-07 08:19:11 UTC
README
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.
