I am trying to check the vision API and uploaded some images to Google Cloud Storage and created a browser application that requests a cloud api to process them.
I have a client_id file that I downloaded from the Google developer console. This has a client_id value, which I use as my api key.
I'm making a request
https://content-vision.googleapis.com/v1/images:annotate?alt=json&key=414712345643-cln7htsuv78jr9i64v8v7g6cnhm3ccff.apps.googleusercontent.com
(changed api key)
and publish the request:
{ "requests": [ { "image": { "source": { "gcsImageUri": "https:\/\/console.cloud.google.com\/m\/cloudstorage\/b\/estoril_test\/o\/AI4C3160.JPG" } }, "features": [ { "type": "LABEL_DETECTION", "maxResults": 1 } ] } ] }
but I get an error:
{ "error": { "code": 400, "message": "API key not valid. Please pass a valid API key.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.Help", "links": [ { "description": "Google developer console API key", "url": "https://console.developers.google.com/project/414754136843/apiui/credential" } ] } ] } }
I have authorized the api key for cloud view api, so what am I doing wrong? I tried an example of twisting in a demo, but I keep getting
Protocol https not supported or disabled in libcurl
I tried adding double quotes, as some research I suggested, but still no luck.
source share