I am using a little bit older version of the PHP package of cloud-vision library, 0.19.0, because of some other dependency issues with other packages. This might be the cause of the problem, but I am not sure.
When working on localhost, I make a request and it all goes well, vision API returns the valid responses, but when I deployed to production, every time I try to use it, it just returns an error.
"message": "Request must specify image and features., "code": 3,"status": "INVALID_ARGUMENT","details": []
Is it the old package, or is something else the problem here? I ran out of ideas.
I am using a PHP library, so the code is pretty simple,I use the
file_get_contents($imageUrl)
The problem was with building the $imageUrl on local/dev and production. I am using AWS, so the $imageUrl on dev was different than production, and the production url is returning an access denied.
Check your urls when working with AWS.