social.colibri.notification.registerPush
Registers a push subscription (Web Push or FCM) for the authenticated user.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | notification.colibri.social |
| Indexed |
Checks
Validunlimited-stringdefs.fcmSubscription.properties.tokenNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.input.schema.properties.platformNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.pushKeys.properties.authNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.pushKeys.properties.p256dhNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"fcmSubscription": {
"description": "A Firebase Cloud Messaging registration token.",
"properties": {
"token": {
"description": "FCM registration token from FirebaseMessaging.getInstance().token.",
"type": "string"
}
},
"required": [
"token"
],
"type": "object"
},
"main": {
"description": "Registers a push subscription (Web Push or FCM) for the authenticated user.",
"errors": [
{
"description": "Missing, malformed, or unverifiable service auth.",
"name": "AuthRequired"
},
{
"description": "A parameter or body field was missing or malformed.",
"name": "InvalidRequest"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"platform": {
"knownValues": [
"web",
"tauri",
"android"
],
"type": "string"
},
"subscription": {
"refs": [
"lex:social.colibri.notification.registerPush#webPushSubscription",
"lex:social.colibri.notification.registerPush#fcmSubscription"
],
"type": "union"
}
},
"required": [
"platform",
"subscription"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"registered": {
"type": "boolean"
}
},
"required": [
"registered"
],
"type": "object"
}
},
"type": "procedure"
},
"pushKeys": {
"description": "Web Push subscription keys.",
"properties": {
"auth": {
"type": "string"
},
"p256dh": {
"type": "string"
}
},
"required": [
"p256dh",
"auth"
],
"type": "object"
},
"webPushSubscription": {
"description": "A browser Web Push subscription.",
"properties": {
"endpoint": {
"format": "uri",
"type": "string"
},
"keys": {
"ref": "lex:social.colibri.notification.registerPush#pushKeys",
"type": "ref"
}
},
"required": [
"endpoint",
"keys"
],
"type": "object"
}
},
"id": "social.colibri.notification.registerPush",
"lexicon": 1
}