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: 
jd303
Newbie

Can't get roChannelStore.StoreChannelCredData to work. Always returns status 400

In a task node, I'm trying to do automatic account linking using a token. But the roChannelStore.StoreChannelCredData ALWAYS returns 400, even in the simplest scenario:

 


Sub Init()

    m.top.functionName = "SimplestCodeToFigureOutTheProblem"

End Sub


Sub SimplestCodeToFigureOutTheProblem()

    cstore = CreateObject("roChannelStore")
    response = cstore.StoreChannelCredData("abc123") 
    print response

End Sub

<Component: roAssociativeArray> =
{
response: ""
status: 400
}

 

I have to be missing something, but I can't determine it from the documentation.

0 Kudos
1 REPLY 1
RokuNB
Roku Guru

Re: Can't get roChannelStore.StoreChannelCredData to work. Always returns status 400

my guess is you are trying that from side-loaded app and that's why StoreChannelCredData()/GetChannelCred() are failing

i believe there is a way to designate which channel ID to be implied in such case. Try if you go to https://developer.roku.com/developer-channels/channels and select for one of your apps Options > "Use for billing testing" - if that's the way?

0 Kudos
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.