Skip to main content
1 of 2
Jorge Arévalo
  • 1.7k
  • 2
  • 16
  • 32

I can't configure authentication with Google Maps Engine driver from GDAL

I'm using last GDAL from trunk, and trying to read from Google Maps Engine (GME) vía GME driver

I already exported

GME_API_KEY: My API Key, for the app I registered
GOA2_CLIENT_ID:  Generated with the "ClientID for installed applications" option in Google OAauth2 API Console
GOA2_CLIENT_SECRET: Idem

Also ran swig/python/scripts/gdal_auth.py script this way:

python swig/python/scripts/gdal_auth.py -s gme

Obtaining a GME_REFRESH_TOKEN, valid for 1 hour.

The problem is I'm getting a HTTP 401 error (Invalid credentials) with requests like this one

ogrinfo "GME:tables={my_table_id}"

Debugging, I've found the Authorization: Bearer HTTP header is incorrect. But I've used the same client id and client secret for QGIS GME plugin and it works.

What should I do to make the driver work? Do I need to define more env vars? Execute the Python script in a different way?

Many thanks in advance

Jorge Arévalo
  • 1.7k
  • 2
  • 16
  • 32