I think what you are asking for is the following:
1. A link in your email will take your customer back to a page on your site.
2. This page has a form and input where they enter a code
3. When the form is submitted it is validated and the customer can then download the file
The first question is - Is the code unique to each customer or simply static.
If it is static then you basically need to validate the form value against the code. If it fails you can use validation toolkit to display the appropriate message.
If the validation passes then you can trigger the File Download using the WA Server Behaviour.
I think that's what you were asking?