google-apidigital-signaturesignaturegoogle-street-viewgoogle-maps-static-api

Unable to generate digital signature for google static street view API


I am trying to use the google static street view API to get an image of a property. The docs for the API state that I need to use a "digital signature": https://developers.google.com/maps/documentation/streetview/overview

I am trying to generate a signature, but the guide google provides doesn't seem to make much sense. These are the docs I am reading in regards to generating a signature: https://developers.google.com/maps/documentation/streetview/digital-signature#get-secret

But when I navigate to this page it doesn't seem to show the things mentioned in the docs that allow you to generate secrets.

The page you end up on


Solution

  • When using Street View Static API or Maps Static API, the documentation specifically says:

    "We strongly recommend that you use both an API key and digital signature, regardless of your usage."

    Regarding your question, you seem to be on the Metrics page instead of the Credentials page. Credentials

    Now on how to generate a digital signature, let me just quote the guide from the Documentation and add some additional details to help you.

    1. Go to the Google Maps Platform Credentials page in the Cloud Console.(You should be on the one I circled on the above image)
    2. Click the project drop-down and select the same project you used when you created the API key for the Street View Static API.
    3. Select the APIs drop-down and select Street View Static API. enter image description here
    4. Scroll down to the Secret Generator card. The Current secret field contains your current URL signing secret.(If there's no current one, Generate Secret button will be the only one you'll see).
    5. The page also features the Sign a URL now widget that allows you to automatically sign a Street View Static API request using your current signing secret. Scroll down to the Sign a URL now card to access it.

    To get a new URL signing secret, select Generate/Regenerate Secret. If there's an existing one, the previous secret will expire 24 hours after you've generated a new secret. After the 24 hours have passed, requests containing the old secret no longer work.

    Since your question is only about generating digital signature, you'll have to read the Documentation for more details and for the next steps.

    Hope this helps.