I have some PHP scripts for creating products using rest api.
All the script are under products_create_factory folder and this folder is in magneto2 root. When I execute a script from that folder from browser domain/products_create_factory/createproduct.php
scripts gives 500 error.
BUT if I run the script from the console it executes.
Scripts are independent of app/bootstrap.php
directory (use only rest api).
I have tried also this option even if scripts use only rest api.
How can I solve this problem?