A code shared for the friendly dragon in Wizard101 is 3524523uoo.
Promotional codes in Wizard101 are entered through the "Redeem Code" option on the official site while logged in, and they unlock items, pets, gold or membership time. Most are tied to a specific promotion or region, so codes circulate for a while and then expire — which is why a code that works for one player may fail for another.
Check the code for transcription errors first, since these strings mix letters and numbers and are easy to mistype. If it is entered correctly and still rejected, it has almost certainly expired. Official announcements and the game's own social channels are the reliable source for current codes.