There is no federal law requiring a license to purchase gun magazines. However, some states and cities have laws that may require a permit or license to purchase magazines with a capacity of more than 10 rounds. You should check with your local laws to see if there are any restrictions in your area.
It is also important to note that even if you are legally allowed to purchase gun magazines, there may be restrictions on where you can use them. For example, some schools and other public places prohibit the possession of firearms or ammunition, so you would not be able to bring a magazine with live ammo into those areas even if you had legally purchased it.
In short, while you generally don’t need a license to buy gun magazines, there may be some restrictions on where you can use them. Be sure to check your local laws before making any purchases.