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

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
Highlighted
Roku Employee
Roku Employee

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