fork 0k-charms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.9 KiB

  1. # -*- ispell-local-dictionary: "english" -*-
  2. * Usage
  3. ** Basic usage
  4. #+begin_src yaml
  5. ntfy:
  6. options:
  7. ## These are default of the charm (different from default of `ntfy`)
  8. #auth-default-access: deny-all
  9. #enable-signup: false
  10. #enable-login: true
  11. #enable-reservations: true
  12. #+end_src
  13. Any option from the help of [[https://docs.ntfy.sh/config/][ntfy]] can be used, to the exception of ~firebase-key-file~.
  14. To setup ~firebase~, there are some slight differences you can find here.
  15. ** Connection with =Firebase=
  16. I you build your own Android/IOS ntfy app, you can use Firebase Cloud
  17. Messaging (FCM) to send notification through official channel. To
  18. configure your server to send notification with Firebase you can:
  19. #+begin_src yaml
  20. ntfy:
  21. options:
  22. firebase: ## content of your firebase service key file in yaml
  23. type: service_account
  24. project_id: myfirebase-project
  25. private_key_id: 0ebce...41480
  26. private_key: |
  27. -----BEGIN PRIVATE KEY-----
  28. MzynkLGbScqN4XAWCU84Q6LLi6MFsnDyrA883Cdkttg1zI62q/BohgIck+897oyb
  29. ..
  30. ifQT/X7DVZl42p0M1mwwdAS8Ig==
  31. -----END PRIVATE KEY-----
  32. client_email: firebase-adminsdk-fodhh@ntfy-0k.iam.gserviceaccount.com
  33. client_id: "101777552980915316312"
  34. auth_uri: https://accounts.google.com/o/oauth2/auth
  35. token_uri: https://oauth2.googleapis.com/token
  36. auth_provider_x509_cert_url: https://www.googleapis.com/oauth2/v1/certs
  37. client_x509_cert_url: https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-fxdhj%40myfirebase-project.iam.gserviceaccount.com
  38. #+end_src
  39. To produce the output from the private service key file you created in
  40. =Firebase= you could:
  41. #+begin_src sh
  42. cat myfirebase-project-firebase-adminsdk-fxdhj-6eaewk4a4.json | yq -p json -o yaml
  43. #+end_src
  44. To get more information about how to deploy your own app [[https://docs.ntfy.sh/config/#firebase-fcm][ntfy's doc
  45. about FCM]] might be helpful.