Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Google Cloud API Key Restrictions on Methods

Hello,

I am setting up a test API key with restrictions according to this documentation. However, I am struggling with figuring out the correct way to specify methods. For example, if I want to allow only Find Places requests from the Places API, do I write out the method as "findplacefromtext"? So that the request body at the end looks like

 

"restrictions": {
      "api_targets": [
        {
          "service": "places.googleapis.com"
          "methods": [
            "findplacefromtext"
          ]
        }
      ]
    }

 

 Or should the method be spelled out differently? I guess more specifically, I am unable to find any documentation on the actual method name that's used for the request endpoint, so I'm not able to determine how to write it out in the request body.

I've also tried to add restrictions following the Python example in this document but that hasn't worked either.

Any help would be appreciated

0 0 558
0 REPLIES 0