Channel Trip (The Only Real Gate)
YouTube exposes no subscription API. The only verifiable action is: you left for the channel and came back. The app creates a signed token (timestamp + random) valid for 30 minutes.
// Token format: timestamp:random
// Example: 1700000000000:123456
// Valid for 30 minutes
Key Generation
On return with valid token, the app derives the key:
nonce = random(1000, 9999)
deviceId = Settings.Secure.ANDROID_ID
key = SHA256(deviceId + ":" + nonce + ":" + packageName).substring(0, 8)
formatted = NNNN-HHHH-HHHHL (with checksum char)