SAN FRANCISCO — A federal judge has rejected class action treatment for a suit against three text messaging firms on behalf of consumers who claim they were charged for subscriptions they never requested.

U.S. District Judge William Alsup on Monday denied a motion to certify two proposed classes to pursue litigation against Mobile Messengers America Inc., mBlox Inc. and Motricity Inc. for alleged violations of the Telephone Consumer Protection Act. The law prohibits calls or text messages to mobile phones using automatic dialing systems without consent.