Roku Developer Program

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

User-Agent string

Hi guys,
Can anybody describe
(1)what is User-Agent string in Roku?
(2)Can i get like : Roku/DVP-5.0 (025.00E08043A)
i mean how can i get output in the complete form like Roku/DVP-5.0 (025.00E08043A).
please give some example also, because i have found some information regarding this here in forum but not understanding completely.

Thanks in advance,
0 Kudos
7 Replies
Highlighted
Level 7

Re: User-Agent string

If anybody have any idea please share your views,it will be helpful for forums user also.
0 Kudos
Highlighted
Level 7

Re: User-Agent string

Full disclosure, this is reverse engineered from the devices that I have and not necessarily correct.

The user agent string shows that you are accessing content with a roku device and provides the SW build that you are running. For example:
Roku/DVP-5.0 (025.00E08043A)

Means you are running Version 5.0 build 8043. The green characters appear to never change. I'm guessing the 02 might indicate a particular device, but I'm not sure.
0 Kudos
Highlighted
Roku Employee
Roku Employee

Re: User-Agent string

This should work:

di=createobject("roDeviceInfo")
version=di.GetVersion()
version_major=mid(version,3,1)
version_minor=mid(version,5,2)
version_build=mid(version,8,5)

if version_minor.toint() < 10 then
version_minor=mid(version_minor,2)
end if
userAgent="Roku/DVP-"+version_major+"."+version_minor+" ("+version+")"
0 Kudos
Highlighted
Level 8

Re: User-Agent string

You can also set the User-Agent string to anything you want, e.g:

ui = CreateObject ("roVideoScreen")
ui.AddHeader ("User-Agent", "Apple TV - version 42")
https://github.com/belltown/
0 Kudos
Highlighted
Roku Employee
Roku Employee

Re: User-Agent string

Ha!

- Joel
0 Kudos
Highlighted
Level 7

Re: User-Agent string

I know this is an old post, but I was looking for this same info, and this is the post that came up in a google search...

I have made some corrections to the original answer as well, I'm sure by now all device values have been discovered, but I will add the ones I know of.

Roku/DVP-5.0 (025.00E08043A)

Means you are running Version 5.0 build 8043. The green characters appear to never change. The 02 indicates the device type.
03 - Roku LT
04 - Roku 3
09 - Roku Stick
Highlighted
Level 7

Re: User-Agent string

@pir8radiocan you link that google search post? Also do you know if different versions of Roku present different user agent strings? For example, do user agent strings for Roku premiere differ from the user agent strings for Roku ultra?

0 Kudos