The Welsh Government has set up a website to test legal highs.
People will be able to send substances anonymously to the site, where they will be analysed and published online.
Public Health Wales said medics had requested the service in response to a "sea change" in the drugs market.
But critics said the project was a waste of money and could be hijacked by dealers.
TOP STORIES TODAY
The Wedinos (Welsh Emerging Drugs and Identification of Novel Substances Project) site was established in response to demand from the emergency services, which are increasingly confronted with patients suffering the effects of taking substances which they cannot identify.
Recent years have seen increasing amounts of novel substances entering the UK drug market, manufactured in labs abroad to mimic the effects of known narcotics while sidestepping the law by changing their precise chemical make-up.
The unfamiliarity of the substances involved has introduced new risks, as users and health workers can be caught out by unexpected and damaging side-effects.
Josie Smith of Public Health Wales told BBC Radio 4's Today programme: "Essentially, the Wedinos project was established as a consequence of a call from clinicians within emergency departments, ambulance and other health services, along with the criminal justice service, where they were being presented with individuals who had taken substances but were unaware of what they were.
"The clinician would be unaware of what the substance was. They didn't know how to treat.
"Over the last few years, we've seen a real sea-change in the drugs market. We refer to the term 'new psychoactive substances' because the term 'legal highs' can denote a degree of safety, and actually we are finding that there are a number of adverse effects that people are experiencing."
Smith said 52% of the samples sent to Wedinos were bought as legal highs, but 27% of those actually contained illegal substances. Evidence from across the UK showed that, even within a single batch of substances brought into the country from China or India, the actual chemical make-up can vary widely.
But Conservative health spokesman in the Welsh Assembly Darren Miller told Today he was opposed to the Wedinos website.
"It's not just legal highs that this website allows people to test. It's also illegal drugs as well," he said.
"It's clearly open to abuse by drugs pushers who can use this, because it's in the public domain, as a marketing tool to publicly advertise the purity of their substances and therefore increase their prices.
"If you go on to the website, you'll find there are brand names on there, there's packaging on there, and it's heroin, crack, methamphetamine, all these sorts of substances that people are sending in to be tested. And it includes even advice on how to snort, inject and smoke those substances.
"I think it's quite clear that the Welsh Labour government have given up the fight against drugs. That's why they've established this website. When it's costing hundreds of thousands of pounds, I would rather see that cash reinvested back into the frontline NHS services that are in crisis at the moment here in Wales."
Smith responded: "We do not specify purity of substances, what we do is test a sample that has been submitted and explicitly name all of the substances that are contained within it. It's not a purity measure."