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: 

Unlinking a Roku box from Roku account?

I'm trying to get my application to automatically unlink itself from the server when the user uninstalls it from their Roku.

The Roku documentation recommends sending a token to the client app on activation which the Roku can use for subsequent operations (like streaming media) on the server. The idea is that if the user uninstalls the app, the token will be lost, effectively decoupling the client from the server.

This approach seems somehow messy, though, seeing as how numerous uninstallations will cause the server to have a lot of useless tokens lying around.

Is there another approach to unlinking the application when the user uninstalls it? Does Brightscript perhaps have a callback that fires when the user uninstalls the app, so I can manually call an endpoint on my server to deactivate it in another way?
0 Kudos
4 Replies
EnTerr
Level 8

Re: Unlinking a Roku box from Roku account?

"dacian_roman23" wrote:
This approach seems somehow messy, though, seeing as how numerous uninstallations will cause the server to have a lot of useless tokens lying around. ... Does Brightscript perhaps have a callback that fires when the user uninstalls the app, so I can manually call an endpoint on my server to deactivate it in another way?

No.
I imagine you can cross-reference the token to the deviceID, in a very specific way - if the same device is linked again to an account (same or another, no matter), the old token can be purged from server. In addition you can periodically purge tokens linked to accounts unpaid (canceled subscription). That should keep token pool relevant, no?
0 Kudos
destruk
Level 10

Re: Unlinking a Roku box from Roku account?

For the 'linking' using a code, once the device has been linked you don't need the code used to link anymore, so delete it. Then every month or so people who have received codes but have not validated, you can purge those too and just have them get a new one if they still want to sign up.
0 Kudos
EnTerr
Level 8

Re: Unlinking a Roku box from Roku account?

"destruk" wrote:
For the 'linking' using a code, once the device has been linked you don't need the code used to link anymore, so delete it.

And how would you handle the case of channel being deleted and re-installed ? Presumably deletion should disconnect the account. Should work with or without factory reset/ownership change, both cases.
0 Kudos
destruk
Level 10

Re: Unlinking a Roku box from Roku account?

I don't see how this would cause a problem? If they don't log in or use your channel for 6 months, delete the user and have them re-link. Generally if they haven't used the code to link the account within a week they aren't going to, at least with channels I've seen. With roku billing there shouldn't really be a reason to actually link an account anymore the old fashioned way - if the channel is free, there are ways around most requirements to make linking outdated as it is.
0 Kudos