gmapsign is a Go pkg and cli tool to sign Google Maps API request URLs.
This is required when using:
-
A client ID with the web service APIs, Maps Static API, or Street View Static API
-
An API key with the Maps Static API or Street View Static API
go install github.com/sgarcez/gmapsign/cmd/gmapsign@latest
echo "https://maps.googleapis.com/maps/api/staticmap?center=40.714%2C+-73.998&client=myclient&size=400x400&zoom=12" \
| gmapsign -key bXlrZXk=
https://maps.googleapis.com/maps/api/staticmap?center=40.714%2C+-73.998&client=myclient&size=400x400&zoom=12&signature=C1UG9w-v41q7i1lISpZsw1xzOV8=