Spaces

Create a short-lived token for a Space's REST API

Returns a bearer token, valid for ttlSeconds, for calling this Space's own WordPress REST API with the access of one of its machine credentials (credentialId). Authenticate normally; you never need that credential's secret. Send the token only to the returned endpoint, and keep it out of logs and chat. The Space re-checks the credential's Grant on every request, so the returned capabilities and role are what to expect, not a promise.

post/v1/spaces/{spaceId}/zero/token

Request

  • Base URL: https://api.spacefast.com
  • URL: https://api.spacefast.com/v1/spaces/{spaceId}/zero/token
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://api.spacefast.com/v1/auth/oauth2/authorize, token URL https://api.spacefast.com/v1/auth/oauth2/token; client credentials, token URL https://api.spacefast.com/v1/auth/oauth2/token, scopes: spaces:write)

Path parameters

spaceIdstring required

Request body

credentialIdstring required

A live machine credential of this Space. Its canonical scoped Grant is the authority the Space's own runtime re-derives the WordPress role from.

ttlSecondsinteger

How long the bearer stays valid, in seconds.

Response

Response for status 200

$schemastring uri

Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

Changes

No recorded changes to this operation across all 1 revision of this API.