1. Go to this page and download the library: Download shahmal1yev/blueskysdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shahmal1yev / blueskysdk example snippets
use Atproto\Client;
use Atproto\Resources\Com\Atproto\Server\CreateSessionResource;
$client = new Client();
// Authenticate using your identifier (e.g., email) and password
$client->authenticate($identifier, $password);
// Once authenticated, you can retrieve the user's session resource
/** @var CreateSessionResource $session */
$session = $client->authenticated();
use Atproto\Contracts\ResourceContract;
// Example: Fetching a profile
$profile = $client->app()
->bsky()
->actor()
->getProfile()
->forge()
->actor('some-actor-handle') // Specify the actor handle
->send();