oauth_clients

Register an app that signs people in [write]

Changed on

The app signs a person in with the authorization-code flow and PKCE (S256) at the sign-in service, asking for openid plus the scopes registered here and naming this API as the resource. The access token it receives is sent as Authorization: Bearer to this API. It acts as that person in one workspace: a person who belongs to several chooses it when they allow the app, and the app is refused everywhere else (universe_mismatch for another workspace named in X-Universe, not_found for a session outside it). It holds only the scopes they allowed and reaches tasks, sessions, agents, the catalog and whoami. On a session in that workspace it can also send messages and interrupts (POST /sessions/{id}/events, POST /sessions/{id}/interrupt, both write) and follow the live stream (GET /sessions/{id}/stream, read). It stops working as soon as the person removes the app from their account page: the next request is refused, and a stream that is open ends within a few seconds. To move the app to another workspace the person removes its access and allows it again. A new app is unreviewed. A caller may register up to 10 apps. Answers 404 until apps with sign-in are open on the platform, and 503 not_migrated until its tables are in place.

post/oauth_clients

Request

  • Base URL
    https://api.agentsky.dev/v1
  • URL
    https://api.agentsky.dev/v1/oauth_clients
  • Auth
    HTTP bearer

Request body

namestring required

Shown to people when they are asked to allow the app.

redirect_urisstring[] required

Where the app may send people back after they decide. Matched exactly: no wildcards, no fragments. Must be https; http://localhost and http://127.0.0.1 are accepted while the app is not reviewed.

scopesstring[] required

What the app may ask a person for. read sees their tasks, agents and sessions; write also starts and changes them.

test_usersstring[]

People besides you who may use the app before it is reviewed, by the email address of their account.

Response

Created

client_secretstring required

Shown in this response only. Keep it on your server.

Changes