Bluesky Module
High-level convenience methods for common Bluesky operations: posting, replying, liking, reposting, following, blocking, uploading blobs, and deleting records. All methods require an authenticated AtpAgent.
Functions and values
| Function or value |
Description
|
|
|
Full Usage:
addListItem agent listUri subject
Parameters:
AtpAgent
-
An authenticated AtpAgent.
listUri : AtUri
-
The AT-URI of the list.
subject : Did
-
The DID of the account to add.
Returns: Task<Result<ListItemRef, XrpcError>>
A ListItemRef on success, or an XrpcError.
|
Add an account to a list.
|
Full Usage:
awaitVideoProcessing agent jobId maxAttempts
Parameters:
AtpAgent
-
An authenticated AtpAgent.
jobId : string
-
The job ID returned by uploadVideo.
maxAttempts : int option
-
Maximum number of poll attempts (default 60, ~90 seconds).
Returns: Task<Result<BlobRef, XrpcError>>
A BlobRef on success, or an XrpcError.
|
Poll a video processing job until it completes, then return the blob reference. Polls every 1.5 seconds, up to a maximum number of attempts.
|
Full Usage:
block agent target
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
The user to block — a Did, ProfileSummary, or Profile.
Returns: Task<Result<BlockRef, XrpcError>>
A BlockRef on success, or an XrpcError. Pass the BlockRef to unblock to undo.
Modifiers: inline Type parameters: ^a |
|
Full Usage:
blockByHandle agent identifier
Parameters:
AtpAgent
-
An authenticated AtpAgent.
identifier : string
-
A handle (e.g., my-handle.bsky.social) or DID string (e.g., did:plc:abc123).
Returns: Task<Result<BlockRef, XrpcError>>
A BlockRef on success, or an XrpcError. Pass the BlockRef to unblock to undo.
|
Block a user by handle string. The handle is resolved to a DID, then the block is created.
Also accepts a DID string directly (if it starts with For type-safe usage when you already have a Did, use block instead. |
Full Usage:
blockModList agent listUri
Parameters:
AtpAgent
-
An authenticated AtpAgent.
listUri : AtUri
-
The AT-URI of the moderation list to block.
Returns: Task<Result<ListBlockRef, XrpcError>>
A ListBlockRef on success, or an XrpcError. Pass the ListBlockRef to unblockModList to undo.
|
Block an entire moderation list. Creates a
|
Full Usage:
createAccount baseUrl handle email password inviteCode
Parameters:
string
-
The PDS base URL (e.g. "https://bsky.social").
handle : Handle
-
The requested handle for the new account.
email : string option
-
Optional email address for the account.
password : string option
-
Optional password. May need to meet instance-specific strength requirements.
inviteCode : string option
-
Optional invite code, if the PDS requires one.
Returns: Task<Result<AtpAgent, XrpcError>>
An authenticated AtpAgent on success, or an XrpcError.
|
Create a new account on the given PDS and return an authenticated agent. Only the handle is required; email, password, and invite code are optional.
|
Full Usage:
createList agent name purpose description
Parameters:
AtpAgent
-
An authenticated AtpAgent.
name : string
-
The name of the list.
purpose : ListPurpose
-
The list purpose (curate list, mod list, or reference list).
description : string option
-
Optional description for the list.
Returns: Task<Result<ListRef, XrpcError>>
A ListRef on success, or an XrpcError.
|
Create a new list.
|
Full Usage:
createStarterPack agent name listUri description feedUris
Parameters:
AtpAgent
-
An authenticated AtpAgent.
name : string
-
The name of the starter pack.
listUri : AtUri
-
The AT-URI of the list containing the starter pack members.
description : string option
-
Optional description for the starter pack.
feedUris : AtUri list option
-
Optional list of feed generator URIs to include.
Returns: Task<Result<StarterPackRef, XrpcError>>
A StarterPackRef on success, or an XrpcError.
|
Create a starter pack.
|
Full Usage:
deleteAccount agent password token
Parameters:
AtpAgent
-
An authenticated AtpAgent.
password : string
-
The account password.
token : string
-
The deletion token received via email after calling requestAccountDelete.
Returns: Task<Result<unit, XrpcError>>
Ok () on success, or an XrpcError.
|
Delete the authenticated user's account. Requires a token from requestAccountDelete (sent via email) and the account password. After successful deletion, the agent's session is cleared.
|
|
Delete a record by its AT-URI. Accepts an AtUri, PostRef, or TimelinePost. Can be used to unlike, un-repost, unfollow, unblock, or delete a post. The AT-URI is parsed to extract the repo DID, collection, and record key. This is a general-purpose delete; pass the AT-URI returned when the record was created.
|
Full Usage:
follow agent target
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
The user to follow — a Did, ProfileSummary, or Profile.
Returns: Task<Result<FollowRef, XrpcError>>
A FollowRef on success, or an XrpcError. Pass the FollowRef to unfollow to undo.
Modifiers: inline Type parameters: ^a |
Follow a user. Accepts a Did, ProfileSummary, or Profile directly.
|
Full Usage:
followByHandle agent identifier
Parameters:
AtpAgent
-
An authenticated AtpAgent.
identifier : string
-
A handle (e.g., my-handle.bsky.social) or DID string (e.g., did:plc:abc123).
Returns: Task<Result<FollowRef, XrpcError>>
A FollowRef on success, or an XrpcError. Pass the FollowRef to unfollow to undo.
|
Follow a user by handle string. The handle is resolved to a DID, then the follow is created.
Also accepts a DID string directly (if it starts with For type-safe usage when you already have a Did, use follow instead. |
Full Usage:
followVia agent target via
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
The user to follow -- a Did, ProfileSummary, or Profile.
via : ^b
-
A PostRef or TimelinePost identifying how the account was discovered.
Returns: Task<Result<FollowRef, XrpcError>>
A FollowRef on success, or an XrpcError.
Modifiers: inline Type parameters: ^a, ^b |
Follow a user with via attribution. The via parameter records where the user discovered the account (e.g. a post that introduced the account).
|
Full Usage:
getActorFeeds agent actor limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
actor : ^a
-
A Handle, Did, ProfileSummary, or Profile.
limit : int64 option
-
Maximum number of feed generators to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<FeedGenerator>, XrpcError>>
A page of FeedGenerator with an optional cursor, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Get feed generators created by an actor. Accepts a Handle, Did, ProfileSummary, or Profile.
|
|
|
Full Usage:
getActorLikes agent actor limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
actor : ^a
-
A Handle, Did, ProfileSummary, or Profile.
limit : int64 option
-
Maximum number of posts to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<FeedItem>, XrpcError>>
A page of FeedItem with an optional cursor, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Get the posts that a specific actor has liked. Accepts a Handle, Did, ProfileSummary, or Profile. |
Full Usage:
getAuthorFeed agent actor limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
actor : ^a
-
A Handle, Did, ProfileSummary, or Profile.
limit : int64 option
-
Maximum number of posts to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<FeedItem>, XrpcError>>
A page of FeedItem with an optional cursor, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Get a specific user's feed (posts by that actor). Accepts a Handle, Did, ProfileSummary, or Profile. |
Full Usage:
getBlocks agent limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
limit : int64 option
-
Maximum number of blocked accounts to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
A page of ProfileSummary with an optional cursor, or an XrpcError.
|
Get the authenticated user's block list.
|
Full Usage:
getBookmarks agent limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
limit : int64 option
-
Maximum number of bookmarks to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<TimelinePost>, XrpcError>>
A page of TimelinePost with an optional cursor, or an XrpcError.
|
Get the authenticated user's bookmarked posts.
|
Full Usage:
getFeed agent feedUri limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
feedUri : AtUri
-
The AT-URI of the feed generator.
limit : int64 option
-
Maximum number of posts to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<FeedItem>, XrpcError>>
A page of FeedItem with an optional cursor, or an XrpcError.
|
|
Full Usage:
getFeedGenerator agent feedUri
Parameters: Returns: Task<Result<FeedGenerator, XrpcError>>
A FeedGenerator on success, or an XrpcError.
|
Get details about a specific feed generator.
|
Full Usage:
getFollowers agent actor limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
actor : ^a
-
A Handle, Did, ProfileSummary, or Profile.
limit : int64 option
-
Maximum number of followers to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
A page of ProfileSummary with an optional cursor, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Get the followers of an actor. Accepts a Handle, Did, ProfileSummary, or Profile.
|
|
|
Full Usage:
getFollows agent actor limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
actor : ^a
-
A Handle, Did, ProfileSummary, or Profile.
limit : int64 option
-
Maximum number of follows to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
A page of ProfileSummary with an optional cursor, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Get the accounts that an actor follows. Accepts a Handle, Did, ProfileSummary, or Profile.
|
|
|
Full Usage:
getKnownFollowers agent actor limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
actor : ^a
-
A Handle, Did, ProfileSummary, or Profile.
limit : int64 option
-
Maximum number of known followers to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
A page of ProfileSummary with an optional cursor, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Get followers of an actor that the authenticated user also follows. Accepts a Handle, Did, ProfileSummary, or Profile.
|
|
|
Full Usage:
getLabelDefinitions agent labelerDid
Parameters: Returns: Task<Result<LabelValueDefinition list, XrpcError>>
A list of LabelValueDefinition on success, or an XrpcError.
|
Get custom label definitions published by a labeler. Returns a list of LabelValueDefinition from the labeler's policies.
|
Full Usage:
getLabelers agent dids
Parameters: Returns: Task<Result<LabelerViewDetailed list, XrpcError>>
A list of LabelerViewDetailed on success, or an XrpcError.
|
Get labeler service views for the given DIDs. Returns the detailed view for each labeler, which includes label value definitions.
|
Full Usage:
getLikes agent target limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
The post (an AtUri, PostRef, or TimelinePost).
limit : int64 option
-
Maximum number of likes to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
A page of ProfileSummary with an optional cursor, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Get the accounts that have liked a specific post. Accepts an AtUri, PostRef, or TimelinePost.
|
|
|
Full Usage:
getList agent listUri limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
listUri : AtUri
-
The AT-URI of the list.
limit : int64 option
-
Maximum number of list items to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<ListDetail, XrpcError>>
A ListDetail containing list metadata and member profiles, or an XrpcError.
|
Get a list's details and members.
|
Full Usage:
getListFeed agent listUri limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
listUri : AtUri
-
The AT-URI of the list.
limit : int64 option
-
Maximum number of posts to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<FeedItem>, XrpcError>>
A page of FeedItem with an optional cursor, or an XrpcError.
|
|
Full Usage:
getLists agent actor limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
actor : ^a
-
A Handle, Did, ProfileSummary, or Profile.
limit : int64 option
-
Maximum number of lists to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<ListView>, XrpcError>>
A page of ListView with an optional cursor, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Get lists created by an actor. Accepts a Handle, Did, ProfileSummary, or Profile. |
Full Usage:
getMutes agent limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
limit : int64 option
-
Maximum number of muted accounts to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
A page of ProfileSummary with an optional cursor, or an XrpcError.
|
Get the authenticated user's mute list.
|
Full Usage:
getNotifications agent limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
limit : int64 option
-
Maximum number of notifications to return (optional, pass None for server default).
cursor : string option
-
Pagination cursor from a previous response (optional, pass None to start from the beginning).
Returns: Task<Result<Page<Notification>, XrpcError>>
A page of Notification with an optional cursor, or an XrpcError.
|
List notifications for the authenticated user.
|
Full Usage:
getPostThread agent target depth parentHeight
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
The post (an AtUri, PostRef, or TimelinePost).
depth : int64 option
-
How many levels of replies to include (optional, pass None for server default).
parentHeight : int64 option
-
How many levels of parent context to include (optional, pass None for server default).
Returns: Task<Result<ThreadNode, XrpcError>>
A ThreadNode tree on success, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Get a post thread, returning a ThreadNode tree. Accepts an AtUri, PostRef, or TimelinePost.
|
|
|
Full Usage:
getPostThreadView agent target depth parentHeight
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
The post (an AtUri, PostRef, or TimelinePost).
depth : int64 option
-
How many levels of replies to include (optional).
parentHeight : int64 option
-
How many levels of parent context to include (optional).
Returns: Task<Result<ThreadPost option, XrpcError>>
Some ThreadPost if the post is accessible, None if not found or blocked, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Get a post thread, returning just the ThreadPost if available.
Returns
|
|
|
Full Usage:
getPosts agent uris
Parameters:
AtpAgent
-
An authenticated AtpAgent.
uris : AtUri list
-
A list of AT-URIs identifying the posts to retrieve.
Returns: Task<Result<TimelinePost list, XrpcError>>
A list of TimelinePost on success, or an XrpcError.
|
Get multiple posts by their AT-URIs in a single request.
|
|
|
Full Usage:
getQuotes agent target limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
The post (an AtUri, PostRef, or TimelinePost).
limit : int64 option
-
Maximum number of quotes to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<TimelinePost>, XrpcError>>
A page of TimelinePost with an optional cursor, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Get posts that quote a specific post. Accepts an AtUri, PostRef, or TimelinePost.
|
|
|
Full Usage:
getRecord agent did collection rkey
Parameters:
AtpAgent
-
An authenticated AtpAgent.
did : Did
-
The DID of the repository that owns the record.
collection : Nsid
-
The NSID of the record collection (e.g. "app.bsky.feed.post").
rkey : RecordKey
-
The record key within the collection.
Returns: Task<Result<CarFile, XrpcError>>
A parsed CarFile, or an XrpcError.
|
Fetch a single record as a CAR (Content Addressable aRchive) file from the repository sync endpoint. |
Full Usage:
getRelationships agent actor others
Parameters:
AtpAgent
-
An authenticated AtpAgent.
actor : Did
-
The primary actor DID to check relationships for.
others : Did list option
-
Optional list of other DIDs to check relationships with.
Returns: Task<Result<Relationship list, XrpcError>>
A list of Relationship on success, or an XrpcError.
|
Get the relationships between the authenticated user and one or more other actors.
|
Full Usage:
getRepostedBy agent target limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
The post (an AtUri, PostRef, or TimelinePost).
limit : int64 option
-
Maximum number of reposts to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
A page of ProfileSummary with an optional cursor, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Get the accounts that have reposted a specific post. Accepts an AtUri, PostRef, or TimelinePost.
|
|
|
Full Usage:
getSuggestedFollows agent actor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
actor : ^a
-
A Handle, Did, ProfileSummary, or Profile.
Returns: Task<Result<ProfileSummary list, XrpcError>>
A list of ProfileSummary on success, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Get suggested accounts to follow based on a given actor. Accepts a Handle, Did, ProfileSummary, or Profile.
|
Full Usage:
getSuggestedFollowsImpl agent actorStr
Parameters:
AtpAgent
actorStr : string
Returns: Task<Result<ProfileSummary list, XrpcError>>
|
|
Full Usage:
getSuggestions agent limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
limit : int64 option
-
Maximum number of suggestions to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
A page of ProfileSummary with an optional cursor, or an XrpcError.
|
Get general account suggestions for the authenticated user.
|
Full Usage:
getTimeline agent limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
limit : int64 option
-
Maximum number of posts to return (optional, pass None for server default).
cursor : string option
-
Pagination cursor from a previous response (optional, pass None to start from the beginning).
Returns: Task<Result<Page<FeedItem>, XrpcError>>
A page of FeedItem with an optional cursor, or an XrpcError.
|
Get the authenticated user's home timeline. |
|
|
Full Usage:
like agent target
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
A PostRef or TimelinePost identifying the record to like.
Returns: Task<Result<LikeRef, XrpcError>>
A LikeRef on success, or an XrpcError. Pass the LikeRef to unlike to undo.
Modifiers: inline Type parameters: ^a |
|
Full Usage:
likeVia agent target via
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
A PostRef or TimelinePost identifying the record to like.
via : ^b
-
A PostRef or TimelinePost identifying how the content was discovered.
Returns: Task<Result<LikeRef, XrpcError>>
A LikeRef on success, or an XrpcError.
Modifiers: inline Type parameters: ^a, ^b |
Like a post with via attribution. The via parameter records where the user discovered the content (e.g. a feed generator post or a quote post).
|
|
|
Full Usage:
loginWithClient client baseUrl identifier password
Parameters:
HttpClient
-
The HTTP client to use for all requests.
baseUrl : string
-
The PDS base URL (e.g. "https://bsky.social").
identifier : string
-
A handle (e.g. "my-handle.bsky.social") or DID.
password : string
-
An app password (not the account password).
Returns: Task<Result<AtpAgent, XrpcError>>
An authenticated AtpAgent on success, or an XrpcError.
|
Create an agent with a custom HttpClient and authenticate. Useful for testing with mock HTTP handlers or custom client configuration.
|
|
Mute a thread. Posts in the muted thread are hidden from your notifications. Accepts an AtUri, PostRef, or TimelinePost.
|
|
Mute an account. Accepts a Did, ProfileSummary, or Profile directly. Muted accounts are hidden from your feeds but not blocked.
|
|
Mute an account by handle string. The handle is resolved to a DID, then the mute is created.
Also accepts a DID string directly (if it starts with For type-safe usage when you already have a Did, use muteUser instead. |
Full Usage:
paginateBlocks agent pageSize
Parameters:
AtpAgent
-
An authenticated AtpAgent.
pageSize : int64 option
-
Maximum number of blocked accounts per page (optional).
Returns: IAsyncEnumerable<Result<Page<ProfileSummary>, XrpcError>>
An IAsyncEnumerable{T} of paginated results.
|
Paginate the authenticated user's block list. Returns an async enumerable of pages.
|
Full Usage:
paginateFeed agent feedUri pageSize
Parameters:
AtpAgent
-
An authenticated AtpAgent.
feedUri : AtUri
-
The AT-URI of the feed generator.
pageSize : int64 option
-
Maximum number of posts per page (optional).
Returns: IAsyncEnumerable<Result<Page<FeedItem>, XrpcError>>
An IAsyncEnumerable{T} of paginated results.
|
Paginate a custom feed. Returns an async enumerable of pages.
|
Full Usage:
paginateFollowers agent actor pageSize
Parameters:
AtpAgent
-
An authenticated AtpAgent.
actor : ^a
-
A Handle, Did, ProfileSummary, or Profile whose followers to list.
pageSize : int64 option
-
Maximum number of followers per page (optional, pass None for server default).
Returns: IAsyncEnumerable<Result<Page<ProfileSummary>, XrpcError>>
An IAsyncEnumerable{T} of paginated results.
Modifiers: inline Type parameters: ^a |
Paginate followers for an actor. Returns an async enumerable of pages.
Each element is a
|
Full Usage:
paginateFollowersImpl agent actorStr pageSize
Parameters:
AtpAgent
actorStr : string
pageSize : int64 option
Returns: IAsyncEnumerable<Result<Page<ProfileSummary>, XrpcError>>
|
|
Full Usage:
paginateListFeed agent listUri pageSize
Parameters:
AtpAgent
-
An authenticated AtpAgent.
listUri : AtUri
-
The AT-URI of the list.
pageSize : int64 option
-
Maximum number of posts per page (optional).
Returns: IAsyncEnumerable<Result<Page<FeedItem>, XrpcError>>
An IAsyncEnumerable{T} of paginated results.
|
Paginate a list feed. Returns an async enumerable of pages.
|
Full Usage:
paginateMutes agent pageSize
Parameters:
AtpAgent
-
An authenticated AtpAgent.
pageSize : int64 option
-
Maximum number of muted accounts per page (optional).
Returns: IAsyncEnumerable<Result<Page<ProfileSummary>, XrpcError>>
An IAsyncEnumerable{T} of paginated results.
|
Paginate the authenticated user's mute list. Returns an async enumerable of pages.
|
Full Usage:
paginateNotifications agent pageSize
Parameters:
AtpAgent
-
An authenticated AtpAgent.
pageSize : int64 option
-
Maximum number of notifications per page (optional, pass None for server default).
Returns: IAsyncEnumerable<Result<Page<Notification>, XrpcError>>
An IAsyncEnumerable{T} of paginated results.
|
Paginate notifications for the authenticated user. Returns an async enumerable of pages.
Each element is a
|
Full Usage:
paginateTimeline agent pageSize
Parameters:
AtpAgent
-
An authenticated AtpAgent.
pageSize : int64 option
-
Maximum number of posts per page (optional, pass None for server default).
Returns: IAsyncEnumerable<Result<Page<FeedItem>, XrpcError>>
An IAsyncEnumerable{T} of paginated results.
|
Paginate the home timeline. Returns an async enumerable of pages.
Each element is a
|
Full Usage:
post agent text
Parameters:
AtpAgent
-
An authenticated AtpAgent.
text : string
-
The post text. Mentions (@handle), links (https://...), and hashtags (#tag) are auto-detected.
Returns: Task<Result<PostRef, XrpcError>>
A PostRef with the AT-URI and CID on success, or an XrpcError.
|
Create a post with automatic rich text detection. Mentions, links, and hashtags are automatically detected and resolved to facets. Internally calls parse to detect and resolve facets before creating the post. Unresolvable mentions are silently omitted from facets. For pre-resolved facets, use postWithFacets instead.
Example
|
Full Usage:
postWithFacets agent text facets
Parameters:
AtpAgent
-
An authenticated AtpAgent.
text : string
-
The post text content.
facets : Facet list
-
Pre-resolved facets (mentions, links, hashtags). Pass an empty list for plain text.
Returns: Task<Result<PostRef, XrpcError>>
A PostRef with the AT-URI and CID on success, or an XrpcError.
|
Create a post with pre-resolved facets. Use this when you have already detected and resolved rich text facets, or when you want full control over facet content. |
Full Usage:
postWithImages agent text images
Parameters:
AtpAgent
-
An authenticated AtpAgent.
text : string
-
The post text. Mentions, links, and hashtags are auto-detected.
images : ImageUpload list
-
A list of ImageUpload records describing the images to attach.
Alt text is required for accessibility. Bluesky supports up to 4 images per post.
Returns: Task<Result<PostRef, XrpcError>>
A PostRef with the AT-URI and CID on success, or an XrpcError.
|
Create a post with attached images and automatic rich text detection.
Uploads each image as a blob, then creates the post with an Images are uploaded sequentially. If any image upload fails, the entire operation returns the error without creating the post.
Example
val imageBytes: byte array
namespace System
namespace System.IO
type File =
static member AppendAllBytes: path: string * bytes: byte array -> unit + 1 overload
static member AppendAllBytesAsync: path: string * bytes: byte array * ?cancellationToken: CancellationToken -> Task + 1 overload
static member AppendAllLines: path: string * contents: IEnumerable<string> -> unit + 1 overload
static member AppendAllLinesAsync: path: string * contents: IEnumerable<string> * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 1 overload
static member AppendAllText: path: string * contents: ReadOnlySpan<char> -> unit + 3 overloads
static member AppendAllTextAsync: path: string * contents: ReadOnlyMemory<char> * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 3 overloads
static member AppendText: path: string -> StreamWriter
static member Copy: sourceFileName: string * destFileName: string -> unit + 1 overload
static member Create: path: string -> FileStream + 2 overloads
static member CreateSymbolicLink: path: string * pathToTarget: string -> FileSystemInfo
...
<summary>Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of <see cref="T:System.IO.FileStream" /> objects.</summary> System.IO.File.ReadAllBytes(path: string) : byte array
namespace Microsoft.FSharp.Data
|
Full Usage:
postWithVideo agent text videoData mimeType altText
Parameters:
AtpAgent
-
An authenticated AtpAgent.
text : string
-
The post text.
videoData : byte[]
-
The raw video bytes.
mimeType : VideoMime
-
The video MIME type.
altText : string option
-
Optional alt text for the video.
Returns: Task<Result<PostRef, XrpcError>>
A PostRef on success, or an XrpcError.
|
|
Full Usage:
quotePost agent text quoted
Parameters:
AtpAgent
-
An authenticated AtpAgent.
text : string
-
The post text. Mentions, links, and hashtags are auto-detected.
quoted : ^a
-
A PostRef or TimelinePost identifying the post to quote.
Returns: Task<Result<PostRef, XrpcError>>
A PostRef with the AT-URI and CID on success, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Create a quote post. The quoted post appears as an embedded record below your text.
|
|
|
Full Usage:
replyTo agent text parent
Parameters:
AtpAgent
-
An authenticated AtpAgent.
text : string
-
The reply text. Mentions, links, and hashtags are auto-detected.
parent : ^a
-
A PostRef or TimelinePost for the post being replied to.
Returns: Task<Result<PostRef, XrpcError>>
A PostRef with the AT-URI and CID on success, or an XrpcError.
Modifiers: inline Type parameters: ^a |
Reply to a post. Fetches the parent to auto-resolve the thread root. This is the recommended way to reply: you only need the parent post's PostRef.
Fetches the parent post via
|
Full Usage:
replyWithKnownRoot agent text parent root
Parameters:
AtpAgent
-
An authenticated AtpAgent.
text : string
-
The reply text. Mentions, links, and hashtags are auto-detected.
parent : PostRef
-
A PostRef for the post being directly replied to.
root : PostRef
-
A PostRef for the thread root post. Same as parent for top-level replies.
Returns: Task<Result<PostRef, XrpcError>>
A PostRef with the AT-URI and CID on success, or an XrpcError.
|
The AT Protocol threading model requires both parent and root references. For a reply to a top-level post, the parent and root are the same. For a reply deeper in a thread, the root points to the original post while the parent points to the immediate post being replied to. |
Full Usage:
reportContent agent subject reason description
Parameters:
AtpAgent
-
An authenticated AtpAgent.
subject : ReportSubject
-
The subject of the report (account or post).
reason : ReasonType
-
The reason type from ReasonType.
description : string option
-
An optional free-text description of the report.
Returns: Task<Result<int64, XrpcError>>
The report ID on success, or an XrpcError.
|
|
Full Usage:
repost agent target
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
A PostRef or TimelinePost identifying the record to repost.
Returns: Task<Result<RepostRef, XrpcError>>
A RepostRef on success, or an XrpcError. Pass the RepostRef to unrepost to undo.
Modifiers: inline Type parameters: ^a |
|
Full Usage:
repostVia agent target via
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
A PostRef or TimelinePost identifying the record to repost.
via : ^b
-
A PostRef or TimelinePost identifying how the content was discovered.
Returns: Task<Result<RepostRef, XrpcError>>
A RepostRef on success, or an XrpcError.
Modifiers: inline Type parameters: ^a, ^b |
Repost with via attribution. The via parameter records where the user discovered the content.
|
Request account deletion. Sends a confirmation email to the account's email address. After receiving the email, call deleteAccount with the token from the email. Requires an authenticated session. |
|
Full Usage:
resumeSession baseUrl session
Parameters:
string
-
The PDS base URL (e.g. "https://bsky.social").
session : AtpSession
-
A previously obtained AtpSession.
Returns: AtpAgent
An authenticated AtpAgent with the given session.
|
Construct an agent from saved session data without making any network calls. Use this to restore a session from persisted tokens.
|
Full Usage:
resumeSessionWithClient client baseUrl session
Parameters:
HttpClient
-
The HTTP client to use for all requests.
baseUrl : string
-
The PDS base URL (e.g. "https://bsky.social").
session : AtpSession
-
A previously obtained AtpSession.
Returns: AtpAgent
An authenticated AtpAgent with the given session.
|
Construct an agent from saved session data with a custom HttpClient. Use this to restore a session from persisted tokens with custom HTTP configuration.
|
Full Usage:
searchActors agent query limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
query : string
-
The search query string.
limit : int64 option
-
Maximum number of actors to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
A page of ProfileSummary with an optional cursor, or an XrpcError.
|
Search for actors (users) matching a query string.
|
Full Usage:
searchActorsTypeahead agent query limit
Parameters:
AtpAgent
-
An authenticated AtpAgent.
query : string
-
The search query string (prefix).
limit : int64 option
-
Maximum number of actors to return (optional).
Returns: Task<Result<ProfileSummary list, XrpcError>>
A list of ProfileSummary on success, or an XrpcError.
|
Lightweight actor search for autocomplete/typeahead. Returns a flat list (no pagination).
|
Full Usage:
searchPosts agent query limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
query : string
-
The search query string.
limit : int64 option
-
Maximum number of posts to return (optional).
cursor : string option
-
Pagination cursor from a previous response (optional).
Returns: Task<Result<Page<TimelinePost>, XrpcError>>
A page of TimelinePost with an optional cursor, or an XrpcError.
|
Search for posts matching a query string.
|
Full Usage:
setContentLabelPref agent label visibility labelerDid
Parameters:
AtpAgent
-
An authenticated AtpAgent.
label : string
-
The label identifier (e.g. "nsfw", "gore").
visibility : ContentLabelPrefVisibility
-
The desired visibility setting.
labelerDid : Did option
-
Optional labeler DID (for custom labelers).
Returns: Task<Result<unit, XrpcError>>
Ok () on success, or an XrpcError.
|
Set the visibility for a content label.
|
|
|
|
|
|
|
Full Usage:
unblockModList agent listBlockRef
Parameters:
AtpAgent
-
An authenticated AtpAgent.
listBlockRef : ListBlockRef
-
The ListBlockRef returned by blockModList.
Returns: Task<Result<unit, XrpcError>>
Ok () on success, or an XrpcError.
|
Unblock a previously blocked moderation list by deleting the list block record.
|
Full Usage:
undo agent ref
Parameters:
AtpAgent
-
An authenticated AtpAgent.
ref : ^a
-
Any ref type with an AT-URI (LikeRef, RepostRef, FollowRef, or BlockRef).
Returns: Task<Result<UndoResult, XrpcError>>
Ok Undone on success, or an XrpcError.
Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone
even if the record was already deleted. Only target-based functions
(unlikePost/unrepostPost) can return WasNotPresent.
Modifiers: inline Type parameters: ^a |
Example
|
Full Usage:
undoBlock agent blockRef
Parameters: Returns: Task<Result<UndoResult, XrpcError>>
Ok Undone on success, or an XrpcError.
Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone
even if the record was already deleted. Only target-based functions
(unlikePost/unrepostPost) can return WasNotPresent.
|
Undo a block by deleting the block record. Returns Undone on success.
|
Full Usage:
undoFollow agent followRef
Parameters:
AtpAgent
-
An authenticated AtpAgent.
followRef : FollowRef
-
The FollowRef returned by follow.
Returns: Task<Result<UndoResult, XrpcError>>
Ok Undone on success, or an XrpcError.
Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone
even if the record was already deleted. Only target-based functions
(unlikePost/unrepostPost) can return WasNotPresent.
|
Undo a follow by deleting the follow record. Returns Undone on success.
|
Full Usage:
undoLike agent likeRef
Parameters: Returns: Task<Result<UndoResult, XrpcError>>
Ok Undone on success, or an XrpcError.
Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone
even if the record was already deleted. Only target-based functions
(unlikePost/unrepostPost) can return WasNotPresent.
|
Undo a like by deleting the like record. Returns Undone on success.
|
Full Usage:
undoRepost agent repostRef
Parameters:
AtpAgent
-
An authenticated AtpAgent.
repostRef : RepostRef
-
The RepostRef returned by repost.
Returns: Task<Result<UndoResult, XrpcError>>
Ok Undone on success, or an XrpcError.
Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone
even if the record was already deleted. Only target-based functions
(unlikePost/unrepostPost) can return WasNotPresent.
|
Undo a repost by deleting the repost record. Returns Undone on success.
|
Full Usage:
unlikePost agent target
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
The post to unlike (a PostRef or TimelinePost).
Returns: Task<Result<UndoResult, XrpcError>>
Ok Undone if the like was found and deleted,
Ok WasNotPresent if the post was not liked by the current user,
or an XrpcError on failure.
Modifiers: inline Type parameters: ^a |
|
|
|
|
|
|
|
|
Unmute an account by handle string. The handle is resolved to a DID, then the unmute is performed.
Also accepts a DID string directly (if it starts with For type-safe usage when you already have a Did, use unmuteUser instead. |
Full Usage:
unrepostPost agent target
Parameters:
AtpAgent
-
An authenticated AtpAgent.
target : ^a
-
The post to un-repost (a PostRef or TimelinePost).
Returns: Task<Result<UndoResult, XrpcError>>
Ok Undone if the repost was found and deleted,
Ok WasNotPresent if the post was not reposted by the current user,
or an XrpcError on failure.
Modifiers: inline Type parameters: ^a |
|
|
|
|
|
Full Usage:
uploadBlob agent data mimeType
Parameters:
AtpAgent
-
An authenticated AtpAgent.
data : byte[]
-
The raw binary content of the blob.
mimeType : ImageMime
-
The MIME type of the blob (e.g., Jpeg, Png).
Returns: Task<Result<BlobRef, XrpcError>>
Ok with a BlobRef on success, or an XrpcError.
The Json field contains the raw JSON for use in embed records,
while Ref, MimeType, and Size
provide typed access to individual fields.
|
Upload a blob (image, video, or other binary data) to the PDS. Returns a typed BlobRef containing the blob reference needed to embed the blob in a record. Use Json when constructing custom embed records, or use postWithImages for a higher-level API that handles blob references automatically. |
Upload a video to the video processing service. Returns a job status that can be polled with getVideoJobStatus. |
|
Full Usage:
upsertPreferences agent updateFn
Parameters:
AtpAgent
-
An authenticated AtpAgent.
updateFn : JsonElement list -> JsonElement list
-
A function that receives the current preferences list and returns the updated list.
Returns: Task<Result<unit, XrpcError>>
Ok () on success, or an XrpcError.
|
Read-modify-write the authenticated user's preferences. Reads current preferences, applies your transform function, and writes the result back. Preferences use last-write-wins semantics (no CAS).
|
Full Usage:
upsertProfile agent updateFn
Parameters:
AtpAgent
-
An authenticated AtpAgent.
updateFn : Profile option -> Profile
-
A function that receives the current profile (or None if the user has no profile record)
and returns the updated profile to write.
Returns: Task<Result<unit, XrpcError>>
Ok () on success, or an XrpcError.
|
Read-modify-write the authenticated user's profile with CAS (compare-and-swap) retry. Reads the current profile, applies your update function, and writes the result back. Automatically retries (up to 3 times) if another write conflicts.
Example
module Option
from Microsoft.FSharp.Core
val defaultValue: value: 'T -> option: 'T option -> 'T
union case Option.None: Option<'T>
union case Option.Some: Value: 'T -> Option<'T>
|