API Key not valid error when trying to access Google cloud vision api

For the "API key not valid" issue, it appears that you are using a Server key, but you need to use a browser key. The Vision API Getting Started page has detailed screenshots, as well as a curl example.

The second issue you are likely to encounter is that the gcsImageUri is the incorrect format. According to the Vision API reference docs the image URI must be in the form "gs://bucket_name/object_name", so in your case: something like: "gs://storil_test/AI4C3160.JPG"


Another problem that can be encountered with a KEY not working is that a particular service has not been added to the project you are trying to work with. That will give this same response.


Problem is resolved.

After generating credentials, Click on 'Create Credentials' Drop down and choose - 'API Key'; the generated API Key will be used..