K2 REST API for push messages 1 year 4 weeks ago #158750

Hello again! Dear stuff and community members,
I made a long way and implemented push web notifications subscription on my website. And it works fine. Still I don't know how to connect my Joomla K2 to its REST API, which is pretty easy by the way.

POST JSON body:
{
	"app_id" : "f9fdxxxxxxxxxxxxxxxxxx6676",
	"contents" : { "en" : "Hello from REST" },
	"included_segments" : ["All"],
	"headings" : {"en": "News up here"},
	"url" : "http://www.google.com"
}
as follows from documentation.onesignal.com/reference#section-example-code

I used Postman service to generate Json post requests and it works, but it is still manually and has no connection with website database.
All I want is that new K2 articles (title, url) like RSS were feeding my push server acc on OneSignal. Unfortunately, I'm not strong backend dev to finish such integration. So I would appreciate any hints.
  • Krikor
  • Krikor's Avatar
  • OFFLINE
  • Moderator
  • Posts: 14746

K2 REST API for push messages 1 year 4 weeks ago #158771

You can have GET request with K2 by applying ?format=json as a suffix to the URL

Example URL: www.joomlaworks.net/blog/item/264-tabs-sliders-has-a-new-home?format=json
IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/

K2 REST API for push messages 1 month 1 day ago #164846

I suggest the ZetPush zetpush.com/ a nice tool for push notifications.
  • Krikor
  • Krikor's Avatar
  • OFFLINE
  • Moderator
  • Posts: 14746

K2 REST API for push messages 4 weeks 1 day ago #164879

One Signal is also an interesting service, although I have not used it in any Joomla! projects.
IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/
Moderators: william white

Who Is Online

Total users online: 5 Members and 3865 Guests Online
Aurelio Frode Matt Beckner Roger Dundas william white
Legend ::   Site Administrator Global Moderator Moderator Banned User Guest
  • Total Messages: 138533 | Total Subjects: 36480
  • Total Sections: 6 | Total Categories: 32
  • Today Open: 0 | Yesterday Open: 8
  • Today Total Answer: 1 | Yesterday Total Answer: 26
Powered by Kunena Forum