Exchange a Rykon account ID token (client rykloud-cli) for a CLI session
POST
/v1/cli/sessionsOperation session.create · stable
No token: this route is how one is madeAnswers201 Created
The session and its two tokens: an access token (rkc_, an hour) and a refresh token (rkr_, rotated on every use, 30 days idle, 90 days at most).
Called without a bearer token: the ID token is the proof. The rykloud CLI does this for you after auth login.
Body (JSON)
Fields not listed here are refused.
- idTokenstringrequired
- An ID token from the Rykon account (id.rykloud.com) for the OAuth client rykloud-cli, at most 10 minutes old.
- scopestringoptional
- "read" or "write" (default write). A read session can see everything you may see and change nothing.
- devicestring, up to 100optional
- What to call this session in your list of signed-in devices (default "rykloud CLI").
Errors
Every error is { "error", "message", "detail"? } (Errors and references). Besides the codes any route can answer, this one refuses with:
- signin_refused
- email_unverified
POST/v1/cli/sessions
curl -X POST "https://api.rykloud.com/v1/cli/sessions" \
-H "Content-Type: application/json" \
-d '{
"idToken": "<idToken>"
}'