Renew a session
This page needs your own installation with an Embed license.
POST/
Renews the frame’s session without a new login code. The frame calls it.
Needs the frame’s session: Authorization: Bearer gri_…. The SDK calls it; you rarely do.
Request
It takes no parameters and no body.
How long it can renew
Once per session, 4 a minute per line of sessions, and for 12 hours after the login code that began the line (EMBED_SESSION_MAX_HOURS, renewableUntil). After that, and on any refusal, the frame asks your server for a login code again.
A removed person, a changed role or a deleted account or workspace ends the session as on any request.
Responses
- 201Created
The new session. The old one ends.
- 401
UNAUTHORIZEDNo session token.
The session ended.
details.reasonsays why, such asaccess_removed,role_changedorworkspace_deleted.Embed isn’t licensed here, or sign-in is off (
details.reason:not_licensedorsign_in_off).It can’t be renewed (
details.reason:account_suspended,preview,max_age,keyorwebsite). Ask your server for a login code.- 429
RATE_LIMITEDThis line of sessions’ renewals this minute are used up.
Something failed on the installation’s side. Try again.
Any call can also answer: 413 PAYLOAD_TOO_LARGE · 415 INVALID_CONTENT_TYPE · 503 BUSY. See Errors.
Request
GORUNNER="https://automations.example.com"
GORUNNER_SESSION="gri_…" # the frame’s session
URL="$GORUNNER/api/embed/v1/sessions/current/renew"
curl -X POST "$URL" \
-H "Authorization: Bearer $GORUNNER_SESSION"const GORUNNER = "https://automations.example.com";
const SESSION = process.env.GORUNNER_SESSION; // gri_…
const res = await fetch(
`${GORUNNER}/api/embed/v1/sessions/current/` +
`renew`,
{
method: "POST",
headers: {
Authorization: `Bearer ${SESSION}`,
},
},
);
const { data } = await res.json();import os, requests
GORUNNER = "https://automations.example.com"
SESSION = os.environ["GORUNNER_SESSION"] # gri_…
res = requests.post(
f"{GORUNNER}/api/embed/v1/sessions/current/"
f"renew",
headers={"Authorization": f"Bearer {SESSION}"},
)
data = res.json()["data"]Response · 201 Created, shortened
{
"data": {
"token": "gri_…",
"expiresAt": "2026-10-25T09:30:00Z",
"renewAfter": "2026-10-25T09:25:00Z",
"renewableUntil": "2026-10-25T21:00:00Z",
"renewInSeconds": 1500,
"account": {
"id": "acct-bakery",
"status": "active"
},
"workspace": {
"id": null,
"default": true
},
"user": {
"id": "ada-123"
},
"role": "editor",
"switches": {
"overview": false,
"workflows": true,
"runs": true,
"…": true
},
"ignored": []
}
}Every field
It takes no body.
Response · 201 Created
dataobjecttokenstringgri_…— send asAuthorization: Bearer; keep in memory only.expiresAttimerenewAftertimerenewableUntiltimeWhen renewing in the frame stops for this line of sessions (12 hours after the login code, the
EMBED_SESSION_MAX_HOURSsetting). Absent for a platform preview.renewInSecondsintegerrenewAfteras whole seconds from this answer, by the server’s clock: schedule the renewal from it, so a device whose clock is off still renews on time.accountobjectidstringstatusstringworkspaceobjectidstring or nullThe partner’s workspace id; null for the default workspace.
defaultbooleanuserobjectidstringrolestringOne of
viewer,operator,editor.switchesobjectEvery switch id with its effective value; a missing id is off.
{key}booleanEach key’s value.
ignoredarray of stringsmeobjectWhat
GET /api/auth/meanswers this session.