No, it is illegal in this case. Article 313-1 of the Criminal Code
Fraudulent obtaining is the act of deceiving a natural or legal person by the use of a false name or a fictitious
capacity, by the abuse of a genuine capacity, or by means of unlawful manoeuvres, thereby to lead such a person, to his
prejudice or to the prejudice of a third party, to transfer funds, valuables or any property, to provide a service or to
consent to an act incurring or discharging an obligation.
Fraudulent obtaining is punished by five years' imprisonment and a fine of €375,000
In French:
L'escroquerie est le fait, soit par l'usage d'un faux nom ou d'une fausse qualité, soit par l'abus d'une qualité vraie, soit par l'emploi de manoeuvres frauduleuses, de tromper une personne physique ou morale et de la déterminer ainsi, à son préjudice ou au préjudice d'un tiers, à remettre des fonds, des valeurs ou un bien quelconque, à fournir un service ou à consentir un acte opérant obligation ou décharge.
L'escroquerie est punie de cinq ans d'emprisonnement et de 375 000 euros d'amende.