Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
dashielpm
Level 7

Getting 406 error when serving json feed for channel

I have a properly formatted JSON feed set up but my server is giving me a 406 Not Acceptable error when your server pings for the data. As such my feed won't load the video into my channel. I can't find any proper documentation on what is going on. Help please. My assumption is that my server is not communicating with the ROKU server properly causing the issue.
0 Kudos
4 Replies
EnTerr
Level 8

Re: Getting 406 error when serving json feed for channel

Speaking in HTTP terms - there is no Roku server involved in this, just Roku client.
You have to figure out some things, see http://stackoverflow.com/a/14252326/226086 for ideas
0 Kudos
dashielpm
Level 7

Re: Getting 406 error when serving json feed for channel

I have been through that page. Now there is some form of a server interaction here, call it the client for roku, but they are trying to download the feed json and it is failing. I'm using the same JSON that they have as their demo content, and when I link to their demo content it works fine, repoint to my server and its fails to download but I get no information from roku.

<?php
    header('Content-Type: application/json');
    header('Access-Control-Allow-Credentials: true');
    header('Access-Control-Allow-Orgin: *');
?>

I have that at the head and have tried a few different variations with no success. The problem I am having is lack of documentation for the direct publishing arm of roku. So my assumption, right or wrong, is that roku client requires some sort of permissions to my server that I can't find documentation on. Am I incorrect in this thinking?
0 Kudos
EnTerr
Level 8

Re: Getting 406 error when serving json feed for channel

"dashielpm" wrote:
I have that at the head and have tried a few different variations with no success. The problem I am having is lack of documentation for the direct publishing arm of roku.

Oh, you are doing "DP"?
You should be posting your questions in the board next door, https://forums.roku.com/viewforum.php?f=100 - where i think nobody answers them Smiley Surprisedops:

So my assumption, right or wrong, is that roku client requires some sort of permissions to my server that I can't find documentation on. Am I incorrect in this thinking?

For the record, "wrong" Smiley Happy.
What happens is your server is generating content type that is not acceptable to the Roku client - and your^ server based on that is throwing a fit. My guess is Roku (DP?) does not send "Accept: */*" but something else. You can check with packet sniffer what and adapt to that - or, for my money just comment out `header('Content-Type: application/json');` and see what happens - or if that does no work try text/plain or text/html, whatever works.

(^) i know, sounds weird but the http server goes over a list of checks before sending response to the client and if it sees they don't "speak the same language", gets the "why bother?" attitude
0 Kudos
dashielpm
Level 7

Re: Getting 406 error when serving json feed for channel

LOL. whoops, my bad on the wrong forum. Thanks for the help, I'll give it a shot.
0 Kudos