Can you legally apply for a credit card using someone else’s name and info?

ri

My cousin is in prison and is trying to build his credit. He asked me to apply for a credit card in his name and use it periodically. Since he is giving permission and asking me to do it, it’s legal right?