Headless and no-shell setup

Authorize a hosted runtime or container without running the scrollport CLI.

View Markdown

A container, serverless function or hosted agent does not need a shell. The device flow is plain HTTP and the human approval remains the security boundary.

Start a device grant

Send an unauthenticated request to the API:

code
POST https://api.scrollport.com/v1/auth/device
content-type: application/json
 
{
  "client_name": "your-agent-name",
  "scopes": ["discover", "inspect", "run", "wallet"]
}

The response includes verification_uri_complete, user_code, device_code and interval. Show both the link and code to the human. Do not hide the code behind an agent-only UI.

Poll for approval

Poll the token endpoint using the device_code and the returned interval:

code
POST https://api.scrollport.com/v1/auth/token
content-type: application/json
 
{ "device_code": "<device_code>" }

authorization_pending means the human has not decided yet. Slow down when the server asks you to; do not create a second grant just because the first poll is pending. On approval, store the returned key in the runtime's secret store and discard the device code.

Check the grant

Call wallet once with the new bearer key. This confirms the key is usable without spending money. The key grants the four control tools and no administrative scope.

If the runtime cannot safely store a secret, stop. Passing a key through a URL, a source file or a log is not a headless setup strategy.