social.colibri.beta.notification.registerPush
Registers a push endpoint for the requesting user's device. Web Push requires endpoint, p256dh, and auth. FCM requires token. APNs requires token and environment.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | notification.beta.colibri.social |
| Indexed |
Checks
Validunlimited-stringdefs.main.input.schema.properties.authNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.input.schema.properties.environmentNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.input.schema.properties.p256dhNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.input.schema.properties.platformNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.input.schema.properties.providerNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.input.schema.properties.tokenNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Registers a push endpoint for the requesting user's device. Web Push requires endpoint, p256dh, and auth. FCM requires token. APNs requires token and environment.",
"errors": [
{
"description": "The request has no valid service auth.",
"name": "AuthRequired"
},
{
"description": "The fields required for the given provider are missing or malformed.",
"name": "InvalidRequest"
},
{
"description": "This AppView has no keypair for the requested provider.",
"name": "PushNotConfigured"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"auth": {
"description": "The Web Push subscription's auth secret. Required when provider is webpush.",
"type": "string"
},
"endpoint": {
"description": "The Web Push subscription endpoint. Required when provider is webpush.",
"format": "uri",
"type": "string"
},
"environment": {
"description": "The APNs environment the device token belongs to. Required when provider is apns.",
"knownValues": [
"sandbox",
"production"
],
"type": "string"
},
"p256dh": {
"description": "The Web Push subscription's p256dh key. Required when provider is webpush.",
"type": "string"
},
"platform": {
"description": "The platform the device runs.",
"knownValues": [
"web",
"ios",
"android",
"macos"
],
"type": "string"
},
"provider": {
"description": "The push provider to register with.",
"knownValues": [
"webpush",
"fcm",
"apns"
],
"type": "string"
},
"token": {
"description": "The FCM registration token or the hex-encoded APNs device token. Required when provider is fcm or apns.",
"type": "string"
}
},
"required": [
"provider",
"platform"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {},
"type": "object"
}
},
"type": "procedure"
}
},
"id": "social.colibri.beta.notification.registerPush",
"lexicon": 1
}