Yes it is not "legal" as by selling this key for ingame gil you are adding on to the RMT problem. If you want to sell this do it for cash on something like ebay, the moment you want anything ingame for it unless it's a "gift to a friend and you do not talk about the circumstances ingame" you are contributing to the RMT problem which if Square found out they may or may not ban you(after the thousands of others they still haven't banned).