actions.checkIn
Reports a finished activity to the Action or Room your app was opened from.
Posts a check-in to the Action's Room, with an optional score, summary and proof data. This is how a mini app completes the habit it belongs to.
| Property | Value |
|---|---|
| Scope | actions.checkin |
| Who can use it | Any developer |
| Status | Available |
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
actionId | string | No | Up to 128 characters. Usually taken from context.get. |
roomId | string | No | Up to 128 characters. Defaults to the Room the app was opened from. |
title | string | No | Up to 120 characters. Defaults to the Action's title, then the app's name. |
score | number | No | A whole number from 0 to 1,000,000. Other values are rounded and clamped. |
summary | string | No | Up to 280 characters. |
proofData | object | No | A plain object of your own fields. Arrays are ignored. |
Result
| Field | Type | Description |
|---|---|---|
ok | boolean | true when the check-in was posted, or when there was no Room to post to. |
messageId | string | The Room message, when one was posted. |
roomId | string | The Room it went to. |
score | number or null | The score you sent. |
summary | string or null | The summary you sent. |
error | string | Present only with ok: false. |
Errors
| Code | When |
|---|---|
4001 | The person said no, now or earlier. |
4200 | The phone cannot offer it, the scope is gated, or the app has no live listing. |
4290 | More than 30 requests in 10 seconds. |
See Error Codes for every code and how they reach your page.
Example
const ctx = await window.aksa.request({ method: "context.get" });
const r = await window.aksa.request({
method: "actions.checkIn",
params: { actionId: ctx.actionId, score: 12, summary: "Finished the daily puzzle" },
});
if (!r.ok) toast("Could not check in");With AksaMini
If your page embeds aksa-mini.js, use its wrapper:
await AksaMini.checkIn({ actionId: ctx.actionId, score: 12, summary: "Finished the daily puzzle" });Notes
- Declare the
actions.checkinscope in your manifest. It is a basic scope, so any developer can use it. - The host posts a completion message to the Room. Keep
summaryshort and meaningful to the people reading it. - Outside a Room, with no
roomId, the call returnsok: truewithout posting anything.
Used By
Ready To Build Or Ship?
Check your files, preview on an iPhone frame, and submit in the Developer Studio.