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: 
simssons2
Reel Rookie

how do I retrieve "channel_data" from roku cloud

Hi!

I want to retrieve data from roku cloud using "getChannelCred" command.

I have two devices(premiere, stick) linked to the same roku account.

I can retrieve "channel_data" from roku cloud with the device I stored data with.

onGetChannelCred()
{ "channel_data" : "myToken", "error" : null, "roku_pucid" : "the same string", "token_type" : "urn:roku:pucid:token_type:pucid_token" }

 

But it's empty when I get with the other device 

onGetChannelCred()
{
    "channel_data" : "",
    "error" : null,
    "roku_pucid" : "the same string",
    "token_type" : "urn:roku:pucid:token_type:pucid_token"
}

Why is that? I can get the same "roku_pucid" from both devices.. but no "channel_data"

it doesn't work for sideloaded channel and unpublished channel? 

 

 

@RokuPam 

Thank you in advance!

0 Kudos
4 REPLIES 4
sanity-check
Roku Guru

Re: how do I retrieve "channel_data" from roku cloud

Just found the exact same issue while trying to implement 'Account Linking'.

 

I'm using roChannelStore but maybe it only works properly with the ChannelStore node? I might have to try that later.

0 Kudos
RokuDavid
Roku Employee
Roku Employee

Re: how do I retrieve "channel_data" from roku cloud

You must be sideloading the same channel on devices or publish both channels.

0 Kudos
bretthacker
Binge Watcher

Re: how do I retrieve "channel_data" from roku cloud

Can you elaborate on this? Is there no way to test this with sideloading to two different devices in the same account during development? We have to publish to test this process?

0 Kudos
bretthacker
Binge Watcher

Re: how do I retrieve "channel_data" from roku cloud

So I figured this out, updating here for others with the same issue. The documentation refers to using the "rekey" utility on the device portal when you want to test different channels on the same device. But if you want to test your Automatic Account Linking code to be sure it's working correctly when auto-enrolling a 2nd device on the same user account, you have to rekey in that scenario as well. So not just two channels on one device, but one channel on 2 devices. The channel_data was encrypted by the first devID and without using rekey on the 2nd device, it was unable to decrypt the contents that were encrypted by the other devid.

Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.