Setup Permissions and Authentication

Ensure your user account has Editor/Owner permissions on the Project

You can check your active account by issuing the following command:

gcloud auth list

If your user account isn't the active account, you can change the active account with the following command:

gcloud config set account `ACCOUNT`

If there is no active accounts, you will need to issue this first:

gcloud auth login

Get the OAuth 2.0 Access Token

The final step before being able to issue requests to the Maps Datasets service is to get the OAuth 2.0 token associated with your user account.

export TOKEN=$(gcloud auth print-access-token)

Now you can start issuing requests to the Maps Datasets API

curl -H "X-Goog-User-Project: PROJECT_NUMBER" -H "Authorization: Bearer $TOKEN" https://mapsplatformdatasets.googleapis.com/v1alpha/projects/PROJECT_NUMBER/datasets/