Simply add a config value where you can save user's inputted key, if that's the problem.
Also, its not possible to encode the key in any way that it won't be obtainable - you can find out what key is being used by simply tracking web requests made from your PC.