You cannot retrieve a lost Roku activation code, but you can trigger it to generate a new code to use in linking the device. Before requesting the generation of a new code, verify that you have not already registered the device's serial number to your account on the Roku website.
If the activation code remains on the television screen after entering it on the Roku activation page, wait for five to 10 minutes. Propagation of the activation information can cause a slight delay. If the Linked Devices section of your Roku account does not list the serial number of the device, request a new activation code from the device by selecting Help and then Get a new code from the on-screen interface of the Roku. Submit the activation code at Roku.com/Link to connect the device to your account.
If the device fails to link a second time, unplug the power cord and wait five to 10 seconds. Connect the power cord again to reboot the device. If the device still does not link to your Roku account, reset it to factory defaults. Depending on the software installed, select either Settings, then Factory Reset, or Settings followed by System and then Factory Reset. Follow the on-screen instructions to complete the process. Repeat the steps necessary to set up and link the Roku device.