Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
matrixebiz
Roku Guru

Does anyone know how to use the Roku Web API

Hello, just wondering if anyone can explain how to use the Roku Web API?
https://sdkdocs.roku.com/display/sdkdoc/Web+Service+API

For starters, in the Developer portal Web API settings page it says;
Push Notification URL
Please provide a URL to receive account activity notifications (e.g. purchases, subscription cancellations, reversals, etc.).

How do you receive notifications to a webserver? http://myserver.com? Don't they mean an email address?

How do I cancel a subscription? 
I don't understand where they are putting the;
Heading: 
Request example:
Response example:
0 Kudos
8 REPLIES 8
joetesta
Roku Guru

Re: Does anyone know how to use the Roku Web API

They mean a web server that listens for incoming http requests, just like a webform does.  You'd have an endpoint that Roku's server will hit and trigger an entry into your database, and send the response to the request.

To cancel a subscription, your server would send to Roku's server the specified Request format, and receive back the response for parsing and recording whatever happened.
aspiring
0 Kudos
destruk
Binge Watcher

Re: Does anyone know how to use the Roku Web API

Keep in mind the push requests might fail depending on your server host.  ie if your server doesn't have accurate reverse-dns lookup (Google VM fails), then this will not work.
0 Kudos
matrixebiz
Roku Guru

Re: Does anyone know how to use the Roku Web API

Okay, thanks for the info. The Roku documentation sucks. It tells you only parts of what needs to be done to accomplish the task 😞
I don't see anywhere on that page where it says that you will need to first setup and configure a web server that listens for incoming http requests to store in a database then explain the steps on how to do that, etc .....
0 Kudos
destruk
Binge Watcher

Re: Does anyone know how to use the Roku Web API

I don't think they have anything like that in the wiki pages.  😞  But yes you'll need to receive events, your server will be required to have an SSL certificate as they only use HTTPS for the push notifications, and they need to be able to 100% verify your web server matches the reverse DNS lookup with the IP and vice-versa.  It's a bit paranoid, - also you'll need to correctly store the push notifications in a database or text file on your server you set up to receive them or they will be lost (a database table works fine for this), and if any of your code isn't correct or you're missing a field being sent or the database query to store the notification is wrong you won't see anything.  After about 140 failures in a row Roku disables push requests to your server and you need to go back and manually re-enable them again on the dashboard.  It would be great if they had a standardized how to instruction page set up, but everyone who implements this feature needs to do it from scratch (AFAIK).
0 Kudos
destruk
Binge Watcher

Re: Does anyone know how to use the Roku Web API

Or I suppose you could pay someone to set it up for you -- but that's silly too since the install and setup would be fairly identical for each person who wanted it.
0 Kudos
matrixebiz
Roku Guru

Re: Does anyone know how to use the Roku Web API

Thanks for the info. I don't mind paying someone to help me but I've offered gratuity for help I needed on other issues I've had in the past that just falls on def ears.
I wanted to move away from the Roku subscription service and have my channel use a username and password to activate/login and manage payment via my own system but doesn't seem to be anyone here that will offer that kind of help 😞
I use this channel template : https://github.com/rokudev/videoplayer-channel

Thread I started here : https://forums.roku.com/viewtopic.php?t=114404
0 Kudos
destruk
Binge Watcher

Re: Does anyone know how to use the Roku Web API

You should probably ask one of the developers here: https://forums.roku.com/viewtopic.php?f=34&t=31664
or other tech sites like upwork.com ?
0 Kudos
matrixebiz
Roku Guru

Re: Does anyone know how to use the Roku Web API

Yeah, I tried a few of them but some didn't respond, some didn't have the time, etc.. but I guess I can try again. Thanks
0 Kudos