-2

I created an android app, where user is uploading images and i need to check them before getting upload for inappropriate contents. I created a Cloud Vision acc, created a project there, restricted it for Android app only by providing the package name and SHA1 fingerprint, then i got the API Key, enabled billing and Cloud Vision API too. Then in my android project i set that API. Now while testing i am getting the below error:

Request failed: {
  "code": 403,
  "errors": [
    {
      "domain": "global",
      "message": "Requests from this Android client application <empty> are blocked.",
      "reason": "forbidden"
    }
  ],
  "message": "Requests from this Android client application <empty> are blocked.",
  "status": "PERMISSION_DENIED"
}
James Z
  • 12,209
  • 10
  • 24
  • 44
Rana Pratap
  • 55
  • 1
  • 9

1 Answers1

0

Why is your application name ? If you have specific limitations set on your API key, but your application is not properly identified, then it makes sense that it's rejected.

Please ensure that you have properly enabled the API first and make sure you created the correct API key / service account for your code.

In fact, I think this tutorial is probably easier as it's specifically designed for Android.

Ying Li
  • 2,500
  • 2
  • 13
  • 37