Skip to main content
This guide pushes a notification from an app, reads it in ego, and lists the app’s pushed notifications from the API.
Notifications work in the app today. The API steps that push and list notifications are in preview.

Prerequisites

  • An ego account with the app running. See the project README to run it locally.
  • A token that carries the notifications:write and notifications:read scopes. Grant them on the consent screen.

Push the notification

The app pushes a notification with notifications:write. Give it a title, a body, and a type to categorize it.
The call returns the notification’s id:

Read it in ego

Open the app and go to Notifications. The pushed notification shows its title, body, and type. Reading it there marks it read.

List what the app pushed

The app lists its own pushed notifications with notifications:read:
The response holds the app’s notifications under data:
An app sees only the notifications it pushed. ego also emits system events to the owner’s inbox — approval.created, approval.resolved, grant.revoked, and connection.error — which never appear in this list.

Next steps

Request approvals

Have an app ask the owner to decide.

API reference

The endpoints behind notifications.