Outcome
Mints a short-lived signed handoff token for the requested app and approved callback.
Before you start
- Verify the intended environment, authenticated identity and explicitly authorized ownership context.
- Discover the published launches:read permission and any required resource grant.
- Approve the actual effects before confirming the unchanged planned request. Fixture identifiers, recipients and provider responses authorize no live operation.
Discover the target
topolo whoami --json
topolo actions get app_topolo_one.launch.secure_token.create --detail --json
- appId: Exact canonical application/service identifier from the discovery expected by this action; a display name is not an id.
Request
POST /api/launch/secure-token
Input fields
| Field | Required | Meaning | Constraints |
|---|---|---|---|
appId | Required | Exact canonical application/service identifier from the discovery expected by this action; a display name is not an id. | {"type":"string","minLength":1} |
callbackUrl | Required | Specifically approved target application callback; protect any returned handoff token. | {"type":"string","minLength":1} |
Interpret the response
Inspect app.id, callbackUrl and expiresAt. Protect the token as a credential; local token minting does not prove that the target consumed it or accepted its issuer.
Inspect the declared output schema and captured variants.
Worked examples
Actual exported One Worker with local Miniflare D1/KV. Authentication, application discovery, checkout, billing and remote widget providers are controlled synthetic responses; outbound access is sealed. No live provider outcome is established.
Save the reviewed input below as payload.json; substitute discovered identifiers and bind credential/resource context separately. CLI:
topolo actions validate app_topolo_one.launch.secure_token.create --data @payload.json --json
topolo actions plan app_topolo_one.launch.secure_token.create --data @payload.json --json
topolo actions call app_topolo_one.launch.secure_token.create --data @payload.json --confirm --detail --json
MCP planning and execution use the same reviewed input:
{
"tool": "topolo_prepare_action",
"arguments": {
"actionId": "app_topolo_one.launch.secure_token.create",
"input": {
"appId": "stk-app",
"callbackUrl": "https://stk.topolo.app"
}
}
}
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_one.launch.secure_token.create",
"input": {
"appId": "stk-app",
"callbackUrl": "https://stk.topolo.app"
},
"confirm": true,
"detail": true
}
}
Refused request · HTTP 401 · auth_error
Input · payload.json:
{
"appId": "stk-app",
"callbackUrl": "https://stk.topolo.app"
}
Captured response:
{
"error": "Token validation failed"
}
Authenticate using the required credential type for this action; service-only actions require the registered Auth service identity.
Successful response · HTTP 200
Input · payload.json:
{
"appId": "stk-app",
"callbackUrl": "https://stk.topolo.app"
}
Captured response:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyX2ludF8xIiwib3JnIjoiaW50ZWdyYXRpb24tb3JnIiwiYXBwIjoic3RrLWFwcCIsImlzcyI6InRvcG9sb29uZS13b3JrZXItdGVzdCIsImF1ZCI6InN0ay1hcHAiLCJpYXQiOjE3OTEyNTEwMDUsImV4cCI6MTc5MTI1MTAzNSwianRpIjoiNGQ1NTIyMGEtNDQ4Ni00MWFhLWE0MTUtMjMyYWNkNjVhYTJlIiwic2luZ2xlVXNlIjp0cnVlLCJ1c2FnZSI6InNzby1sYXVuY2gifQ.Qo350nEUtwrBcHki-LV_nZmOgw0-fyT_k0AV1P4l96k",
"expiresAt": "2026-10-06T01:43:55.000Z",
"callbackUrl": "https://stk.topolo.app",
"app": {
"id": "stk-app",
"name": "Secure Token App",
"description": "Secure handoff target"
},
"instructions": {
"method": "POST",
"endpoint": "https://stk.topolo.app/sso/token",
"body": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyX2ludF8xIiwib3JnIjoiaW50ZWdyYXRpb24tb3JnIiwiYXBwIjoic3RrLWFwcCIsImlzcyI6InRvcG9sb29uZS13b3JrZXItdGVzdCIsImF1ZCI6InN0ay1hcHAiLCJpYXQiOjE3OTEyNTEwMDUsImV4cCI6MTc5MTI1MTAzNSwianRpIjoiNGQ1NTIyMGEtNDQ4Ni00MWFhLWE0MTUtMjMyYWNkNjVhYTJlIiwic2luZ2xlVXNlIjp0cnVlLCJ1c2FnZSI6InNzby1sYXVuY2gifQ.Qo350nEUtwrBcHki-LV_nZmOgw0-fyT_k0AV1P4l96k"
},
"security": "Token will not appear in browser history or logs"
}
}
Inspect app.id, callbackUrl and expiresAt. Protect the token as a credential; local token minting does not prove that the target consumed it or accepted its issuer.
Verify the result
- Inspect app.id, callbackUrl and expiresAt. Protect the token as a credential; local token minting does not prove that the target consumed it or accepted its issuer.
Errors and recovery
auth_error(HTTP 401): Authenticate using the required credential type for this action; service-only actions require the registered Auth service identity.
These are observed local refusals; inspect the raw error body because one SDK code can represent several handler messages. Preserve the request id when available.
Recovery boundary
An unused token expires; avoid logging or publishing real tokens. Follow the target app’s actual handoff validation.
Evidence
Actual exported One Worker with local Miniflare D1/KV. Authentication, application discovery, checkout, billing and remote widget providers are controlled synthetic responses; outbound access is sealed. No live provider outcome is established.