Try something like this (untested) code to get the secure token from within your Roku channel:
Sub Main ()
timestamp = CreateObject ("roDateTime").AsSeconds ().ToStr ()
token = generateToken ("secretapikey", "readonly", timestamp)
Print token
Stop
End Sub
Function generateToken (apiKey As String, scope As String, timestamp As String) As String
token = ""
hmac = CreateObject ("roHMAC")
baKey = CreateObject ("roByteArray")
baKey.FromAsciiString (apiKey)
If hmac.Setup ("md5", baKey) = 0
baMessage = CreateObject ("roByteArray")
baMessage.FromAsciiString (apiKey + ":" + scope + ":" + timestamp)
hmac.Update (baMessage)
baResult = hmac.Final ()
If baResult.Count () > 0
token = baResult.ToHexString ()
End If
End If
Return token
End Function