you dont need to know the code, you simply can get the item linked from a friend playing wow via your Friends List (battle net friends, not only wow friends)
i did the same with some legendarys from my Demon Hunter, linking them for an friend playing WOW, who linked those from our conversation into his Trade chatt
Awesome bot. Burns a health potion on every mob pack and almost dies to simple elites. And all that for Nightmare loot. Lol. Good thing he's not in Hell or his dogs would get 1-shot by elites and the bot would basically be repeating a cycle of "log in, aggro mobs, burn health potion, disconnect".
He would be better off just going to one of the AFK gold farm areas...