Give bard a delegation token so it can keep reading a space. Any member can call this with a token they issued. Bard trades it for a credential, renews its notification registration when due, and catches up on anything it missed.
Input
application/jsondelegationToken
string
Required
A delegation token the caller minted for this space. Used once and never stored.
space
stringat-uri
Required
An AT Protocol URI (e.g., at://did:plc:xyz/app.bsky.feed.post/abc).
Output
application/jsonaccessExpiresAt
stringdatetime
Required
When bard's new credential expires.
drained
integer
Required
Queued notifications this grant turned into sync jobs.
registrationExpiresAt
stringdatetime
Optional
When bard's notification registration with the space host expires.
Errors
SpaceNotFound
Bard is not connected to that space. Call connectSpace first. GrantIssuerMismatch
The delegation token was not issued by the caller. GrantExpired
The delegation token has expired. GrantRefused
The space host refused the exchange. AppNotAllowed
The space does not allow bard access. SpacesDisabled
Space support is disabled on this deployment. Try It
Requests are sent directly from your browser. Some servers may block requests due to CORS.
View raw schema
{
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"space",
"delegationToken"
],
"properties": {
"space": {
"type": "string",
"format": "at-uri"
},
"delegationToken": {
"type": "string",
"description": "A delegation token the caller minted for this space. Used once and never stored."
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "SpaceNotFound",
"description": "Bard is not connected to that space. Call connectSpace first."
},
{
"name": "GrantIssuerMismatch",
"description": "The delegation token was not issued by the caller."
},
{
"name": "GrantExpired",
"description": "The delegation token has expired."
},
{
"name": "GrantRefused",
"description": "The space host refused the exchange."
},
{
"name": "AppNotAllowed",
"description": "The space does not allow bard access."
},
{
"name": "SpacesDisabled",
"description": "Space support is disabled on this deployment."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"accessExpiresAt",
"drained"
],
"properties": {
"drained": {
"type": "integer",
"description": "Queued notifications this grant turned into sync jobs."
},
"accessExpiresAt": {
"type": "string",
"format": "datetime",
"description": "When bard's new credential expires."
},
"registrationExpiresAt": {
"type": "string",
"format": "datetime",
"description": "When bard's notification registration with the space host expires."
}
}
},
"encoding": "application/json"
},
"description": "Give bard a delegation token so it can keep reading a space. Any member can call this with a token they issued. Bard trades it for a credential, renews its notification registration when due, and catches up on anything it missed."
}