You can be invited to a “coffee shop” or a “cannabis club” directly on the street in Barcelona. Mind that such offers are illegal: private cannabis clubs have no right to advertise and use promoters on the streets. Stay away from street promoters and ignore such offers, especially in the city center.
The black market offerings can be divided into two types: buy marijuana directly on the street or proceed to a fake “cannabis club”, which has nothing in common with real social clubs. In both cases, you will get very low-quality marijuana and potential problems with the police and law (acting in this way, you get involved in drug trafficking). Don’t push your luck, choose legal smoking clubs with a strong reputation only.