mirror of
https://github.com/Finb/Bark.git
synced 2026-04-26 06:25:55 +03:00
[GH-ISSUE #295] Feature Request: Easier way to retrieve user device_key for integrations #260
Labels
No labels
bug
enhancement
in progress
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Bark#260
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JRebertt on GitHub (Mar 24, 2025).
Original GitHub issue: https://github.com/Finb/Bark/issues/295
Hi there! 👋
I'm working on integrating Bark into my own backend system to send push notifications to users.
I was wondering: is there currently an easy way to programmatically retrieve the user's device_key (the one used to receive notifications), similar to a “plug-and-play” integration?
Ideally, I’d like to let the user connect Bark to their account without needing much interaction inside the mobile app — for example, using a webhook or a callback after tapping a notification.
Does anything like this exist or is planned? Or would you recommend any best practices for this kind of user onboarding flow?
Thanks in advance for your awesome work on Bark! 🚀
@Finb commented on GitHub (Mar 25, 2025):
Hi there,
You can add your service to the user’s app using a URL Scheme.
Two routes need to be implemented:
(You can also simply forward the requests to the Bark-Server.)
URL Scheme:
or
Once the user clicks the link and successfully adds the server, your server will receive a register request.
@JRebertt commented on GitHub (Mar 25, 2025):
Hey! @Finb 👋
I'm running the Bark server on my VPS using Docker, and I'm trying to better understand how the
/registerroute works.After the user clicks
bark://addServer?address=..., how can I associate thedevice_keywith a user in my system? I’d like to store this key in my database to send notifications to that user later.Is there any way for my backend to receive this information (like the
device_key) automatically when the registration is done?If there's a recommended approach, could you show an example of how to handle this in Node.js?
Thanks! 🔥
@Finb commented on GitHub (Mar 26, 2025):
An untested but potentially feasible solution:
Then, provide users with the URL Scheme: