No, using codes is not against the game rules as long as they are official and follow the game rules. You should not follow any unethical or violation of game rules, as it will block your account.