Paid Roku Channels: Registration & Linking with WordPress


This Instant TV Channel walk-through only applies to Custom SDK Roku channels. Registration & Linking cannot be used with Direct Publisher Roku channels.

The Instant TV Channel sample Registration & Linking WordPress plugin is designed to allow self-service channnel activation by subscribers, in conjunction with a separate subscriber management & access package like "S2Member". The plugin also demonstrates how to remotely enable and disable a Roku channel from a website. The plugin has a limited number of features and will require modifications by someone familiar with PHP and WordPress programming if additional features are required.

Instant TV Channel is pleased to offer a free WordPress example plugin that demonstrates how to provide Roku Registration & Linking services to WordPress-based web sites. Registration & Linking is a technique that allows you to register customers before they are permitted to have access to your Roku channel. Instant TV Channel's implementation of Registration & Linking uses Amazon S3 buckets to link your customer's account on your web site with your customer's Roku player.

The WordPress plugin provided by Instant TV Channel manages your S3 buckets automatically, you only need to provide the plugin with your bucket names and keys.

Registration & Linking can be used together with any WordPress payment-processing plugin to implement a paid Roku channel. For example, a WordPress-based web site could require customers to enter a payment, make a donation, or sign up for a subscription before being granted access to the page containing the Registration & Linking widget or shortcode.

Step-by-Step Configuration Directions:

  1. Go to the S3 section of your AWS (Amazon Web Services) control panel and create three new S3 buckets. Name them something like "my-registration-bucket", "my-linking-bucket", and "my-account-bucket". You will use the bucket names in several of the following steps.
    • The bucket Region must be set to "US East (N. Virginia)". Any other region may cause the registration and linking process to fail.
    • The checkboxes under "Block Public Access settings for bucket" should all be unchecked.
    • These buckets will only be used for Roku player registration and should not be used for Instant TV Channel Configuration File or Content storage.
    • Use only lower-case characters, digits, and dashes in your bucket name. Instant TV Channel does not support the use of upper-case characters or other symbols in bucket names.

      Good Bucket Name: registration-bucket
      Good Bucket Name: reg123
      Bad Bucket Name: registration.bucket (contains unsupported period character ".")
      Bad Bucket Name: reg+123 (contains unsupported plus character "+")
      Bad Bucket Name: Reg-Bucket (contains upper-case characters "R" and "B")
  2. Go to the IAM (Identity and Access Management) section of your AWS control panel where we will create a new IAM identity and keys.
    1. Click the Policies link on the left side of the page.
    2. Click the Create Policy button near the top of the page.
    3. Click the JSON tab, and erase the sample lines of JSON text.
    4. Copy the security policy below and paste it into the JSON text box. Replace "my-registration-bucket", "my-linking-bucket", and "my-account-bucket" with the names of the three buckets you just created.
      {
        "Version": "2012-10-17",
        "Statement": [
          {
            "Effect": "Allow",
            "Action": [
              "s3:*"
            ],
            "Resource": [
              "arn:aws:s3:::my-registration-bucket",
              "arn:aws:s3:::my-registration-bucket/*",
              "arn:aws:s3:::my-linking-bucket",
              "arn:aws:s3:::my-linking-bucket/*",
              "arn:aws:s3:::my-account-bucket",
              "arn:aws:s3:::my-account-bucket/*"
            ]
          }
        ]
      }
    5. Click the Next: Tags button near the bottom of the page.
    6. Click the Next: Review button near the bottom of the page.
    7. Provide a new Policy Name, for example "my-reglink-policy". You may optionally also enter a Policy Description.
    8. Click the Create policy button near the bottom of the page.
    9. Click the User groups link on the left side of the page.
    10. Click the Create group button near the top of the page.
    11. Provide a new User group name, for example "my-reglink-group".
    12. Scroll down to the list of policies, and locate the "my-reglink-policy" policy that you just created, or type the name of your newly created policy in the "Filter" box. You may need to scroll through a large number of built-in AWS policies until your policy is visible.
    13. Check the checkbox to the left of your policy name. making sure that no other checkboxes are checked, then click the Create Group button near the bottom of the page.
    14. Click the Users link on the left side of the page.
    15. Click the Add Users button near the top of the page.
    16. Provide a new User name, for example "my-reglink-user".
    17. Click the Next button near the bottom of the page.
    18. Check the checkbox to the left of the previously created Group name, then click the Next button near the bottom of the page.
    19. Click the Create user button near the bottom of the page.
    20. Click the previously created User name from the list of users. This will display a Summary page for the user.
    21. Click the Security credentials link or tab.
    22. Click either of the Create access key buttons.
    23. Select Other, then click the Next button.
    24. Click the Create access key button.
    25. Click the Show link beneath "Secret access key" or click the Download .csv button to copy and save the Access Key ID and Secret Access Key. These keys will be used exclusively for your Registration and Linking buckets. They cannot be used to access any other AWS buckets or services. Make sure that you save the keys for future use, Amazon will not display them again. If you misplace the keys you will have to create a new IAM user.
    26. After copying the Security Credentials, click the Done button near the bottom of the page.

      At this point we have a new IAM user that is a member of a new IAM group - the user has the keys and the group has the security policy. The keys for this IAM user can be used in the Roku channel to access the S3 Registration and Linking buckets specified by the security policy.

    27. Download the wp_irchan.zip file from http://ex.irchan.com/wp_irchan_2023.zip
    28. If you want to use two registration widgets with different settings for the same channel and website, also download the wp_irchan2.zip file from http://ex.irchan.com/wp_irchan2.zip. This can be used, for example, to have both a paid registration widget with unlimited renewals and a free-trial registration widget with no renewals that expires in 30 days.

      Both the wp_irchan and wp_irchan2 zip files must be installed in order to use both registration widgets on the same website. You can also install the wp_irchan2 zip file later, it is not required if only a single registration widget is needed.

    29. Install the zip file(s) into your WordPress server's wp-content/plugin directory.
    30. Activate the plugin and install the widget as you would any other WordPress plugin or widget. The shortcode for the widget is [irchan]. If you installed two plugins, the shortcode for the second widget is [irchan2]. Make sure to place the widget on a page or pages that are only available to paid subscribers.
    31. Configure the widget by clicking on Instant TV Channel in the main WordPress Settings menu.
      • Optional Partner ID - If used, this must be identical to the Partner ID you have specified on the Instant TV Channel Registration page for the channel.
      • Registration Bucket Name - The name of the S3 Registration Bucket that you previously created.
      • Linking Bucket Name - The name of the S3 Linking Bucket that you previously created.
      • Account Bucket Name - The name of the S3 Account Bucket that you previously created.
      • Access Key ID - The Access Key ID for the Registration & Linking IAM account you previously created.
      • Secret Access Key - The Secret Access Key for the Registration & Linking IAM account you previously created.
      • Widget Title - Appears above the widget on your WordPress pages.
      • Widget Button Label - The text that appears on the widget's button.
      • Success Message - Text that is displayed if linking is successful.
      • Failure Message - Text that is displayed if linking fails. This will occur if the Roku Registration Code is incorrectly entered, or if any of the bucket names or keys are incorrect.
      • Renewal Limit Message - Text that is displayed if a user attempts to exceed the maximum allowed number of renewals.
      • Maximum Number of Renewals - The maximum number of subscription renewals for each subscriber. 0 allows no renewals. Blank allows unlimited renewals. Renewals are tracked by counting the linking files, so do not delete expired files from the S3 Linking bucket if Maximum Number of Renewals is not blank.
      • Player Limit Message - Text that is displayed if a user attempts to exceed the maximum allowed number of registered Roku players.
      • Default Maximum Number of Players - The number of Roku players that a subscriber is permitted to have. Typical values are 1 through 5. This value can be overridden on a per-subscriber basis.
      • Default Registration Lifetime - The number of minutes until the registration expires, starting from when the Roku player is registered. If 0 or blank, the registration will never expire.
      • Default Command - A command to execute on the user's Roku player. Can be overridden on a per-player basis.
        • Delete Token - Delete the token from the player and force re-registration as soon as the registration-protected area of the channel is entered.
        • No Command - Do nothing. This is the typical setting.
      • Debug Widget - Should always be set to No for production web sites. Displays trouble-shooting information beneath the widget that can be helpful with S3 bucket configuration problems.
    32. Go to the channel's Registration page on the main Instant TV Channel web site. This is only available for a Commercial channel. Under Registration Control:
      • Change Registration Service Provider to SELF.
      • Enter the same Optional Partner ID (if any) that you used in the WordPress plugin. If present, this will also be the folder or directory name in your S3 buckets that will contain the registration, linking, and account files for this channel. If not present then the registration, linking, and account files will be located at the top-level of your buckets.

      Under AWS S3 Buckets:
      • Enter the Registration and Linking bucket names and keys that you created earlier.
      • Click the TEST S3 BUCKETS button and verify that the S3 Bucket Tests Passed message is displayed.

      Under Registration Screen:
      • Change the text for Focal2 to contain the URL for the registration page on your WordPress site.
      • Customize anything else.
    33. The EraseDeviceToken setting in the Theme Editor allows you to erase the channel's Registration & Linking device token in a player. If set to yes, players will always have to go through the Registration & Linking process, even if they have previously been registered. Any player that attempts to access a protected section of your Roku channel will have its device token erased, so you usually only want to have this set to yes for testing, and set to no for a production channel.
    34. Please read this information about the Registration, Linking, and Account buckets before attempting to delete any files! Technical details about Instant TV Channel's implementation of Roku's Device Registration & Linking specification are available here.

    To learn how to create a Roku channel using Instant TV Channel, please see this Developer Walk-Through.

    Questions, comments or suggestions about this Roku developer guide or the Instant TV Channel WordPress plugin can be emailed to .

Instant TV Channel is a cloud-based tool for Roku developers and content providers that shortens development time and eases maintenance after deployment.


Subtitles

If you are considering subtitles for your Roku video content, our sister-site InstantSubtitles.com provides an easy-to-use and inexpensive solution. Click here for more information.




Access Code: ID1
Check out Instant TV Channel by adding our latest demonstration channel to your Roku player.



Instant TV Channel is not affiliated with nor endorsed by Roku Inc.