Hands the AppView access to one of the requesting user's personal spaces. The client mints a delegation token on its own PDS for the space and passes it here, because a delegation token is single-use and short-lived and the AppView has no OAuth session of its own. The AppView exchanges the token for a space credential and syncs the space.
Input
application/jsondelegationToken
string
Required
A delegation token minted by the user's PDS for the space.
space
stringspace-ref
Required
The space to grant access to.
Output
application/jsonexpiresAt
stringdatetime
Required
When the resulting space credential expires. The client should call this again before then to keep access current.
Errors
AuthRequired
The request has no valid service auth. InvalidRequest
The arguments are inconsistent or malformed beyond schema validation. InvalidDelegationToken
The delegation token is malformed, expired, or already used. SpaceNotFound
No space matches the given space reference. NotAuthorized
The delegation token does not grant access to the given space. UpstreamFailure
The user's PDS failed while the AppView exchanged the delegation token or synced the space. 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": "space-ref",
"description": "The space to grant access to."
},
"delegationToken": {
"type": "string",
"description": "A delegation token minted by the user's PDS for the space."
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "AuthRequired",
"description": "The request has no valid service auth."
},
{
"name": "InvalidRequest",
"description": "The arguments are inconsistent or malformed beyond schema validation."
},
{
"name": "InvalidDelegationToken",
"description": "The delegation token is malformed, expired, or already used."
},
{
"name": "SpaceNotFound",
"description": "No space matches the given space reference."
},
{
"name": "NotAuthorized",
"description": "The delegation token does not grant access to the given space."
},
{
"name": "UpstreamFailure",
"description": "The user's PDS failed while the AppView exchanged the delegation token or synced the space."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"expiresAt"
],
"properties": {
"expiresAt": {
"type": "string",
"format": "datetime",
"description": "When the resulting space credential expires. The client should call this again before then to keep access current."
}
}
},
"encoding": "application/json"
},
"description": "Hands the AppView access to one of the requesting user's personal spaces. The client mints a delegation token on its own PDS for the space and passes it here, because a delegation token is single-use and short-lived and the AppView has no OAuth session of its own. The AppView exchanges the token for a space credential and syncs the space."
}