Get Web Push status
const url = 'https://example.com/api/v1/me/push';const options = { method: 'GET', headers: {cookie: 'better-auth.session_token=<better-auth.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/me/push \ --cookie better-auth.session_token=<better-auth.session_token>Returns whether Web Push is configured on this instance, the VAPID public key for browser subscription, and the signed-in user’s active push subscriptions.
Requires a signed-in browser session; API tokens are rejected with 403.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Web Push configuration and active subscriptions
object
Whether VAPID keys are configured on this instance.
Active Web Push subscriptions for the signed-in user.
Example generated
{ "configured": true, "publicKey": "example", "subscriptions": [ { "createdAt": "example", "endpoint": "example", "id": "example", "label": "example" } ]}Authentication required or credentials invalid.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Insufficient role, bucket grant, or token scope.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Unexpected server error. Quote data.requestId when you report it.
Error returned when Sendcrate or one of its providers fails (5xx).
object
object
Error chain with stack traces. Present only when the server runs in development mode.
Request reference to quote when you report the error.
Human-readable error explanation.
Example
{ "code": "INTERNAL_SERVER_ERROR"}