Samuel
However I do have a backend set up so if I had to that it wouldn’t be the end of the world
1 1
Skeets App
Am looking into that as well. What endpoint are you registering device tokens against? At least on iOS you cannot register decices against the official bsky backend because of differing signing keys (app, backend).
1 1
Skeets App
Even if you connect your FCM to your APNS account (which is possible), how are you getting the notifications from Bluesky to YOUR FCM instance?
2 2
Skeets App
As far as I understand the library it only handles the client-side of push notifications. The issue I have is that i don’t see a way to enable bsky to push notifications to firebase/apns that then get delivered to 3rd party apps. For that to work bsky would need the 3rd party‘s push certificate.
1
Samuel
Hmm not sure. The way the official app works is that it gets the device push token and sends it to bsky
2 1
Skeets App
Yeah and then bsky sends the push notifications using that token and a shared certificate (shared btw app and backend). APNS checks if the app it sends the notifications to has a matching certificate. That’s the problem I see. 3rd party apps have their own push credentials.
1 2
Ansh
Check the official app. You can register a push token for users with your particular push endpoint and it should work for Graysky. Email me if you have issues at ansh [at] blueskyweb [dot] xyz
3 4
Ansh
It’s under notifications lexicon. Docs aren’t there yet unfortunately :/
1 2
Samuel
You give the api a token, an appId, and a serviceDid. The service DID tells bsky where to send notifications, which you then send to devices using APN/FCM
1 1 2
Skeets App
What is the endpoint for? Will this be my „server“-endpoint that gets notified when there is a new push notification (and then delivers that push itself)? Or does bsky send the pushes to e.g. APNS directly? I always thought device tokens were bound to the bundle-id and the push cert? 🤷‍♂️
2
Ansh
The code looks something like this store.agent.api.app.bsky.notification.registerPush({ serviceDid: SERVICE_DID(store.session.data?.service), platform: devicePlatform, token: t, appId: 'xyz.blueskyweb.app', Notice how you can send an appId
2 5
Samuel
Wait nvm I finally found where it makes the request to the server - it’s the same xrpc registerPush endpoint
1 3
Samuel
Host a did.json file in your backend and then use did:web:mybackend.com as the serviceDid
1
1 more reply
Ansh
Right now the service DID is the Bsky App View but it can be your own service too if you want. We’ll just forward the data there
1 2
Skeets App
Ok. So that can be just a URL? What’s the data flow if I don’t set the service? I mean bsky cannot deliver data to APNS for my app without the push cert, can it?
1
1 more reply
Skeets App
There was a thread about this on discord on which they essentially said you need to setup your own backend and work the firehose :(
1 1