Reputation: 841
I need help with (free) Google Maps Engine projects. When querying for the list of projects accessible to me using the Google Maps Engine Java API, none is returned even though I've successfully created a project and created OAuth credential and token.
I created a Google APIs project labeled "Greenville Oaks" whose project name is "greenvilleoaks" and owned by myself ([email protected]). This project has 3 APIs enabled for it: Distance Matrix API, Geocoding API, and Google Maps Engine API. I created a public API access key and an OAuth JSON file and P12 certificate using client ID "XYZ.apps.googleusercontent.com" with associated email address "[email protected]" (I've replaced the real value with "XYZ" for the purposes of this discussion). According to the developers console permissions screen, this service account has "can edit" permission.
Oddly enough, when I access https://mapsengine.google.com/admin from Google Chrome to look at the project, Chrome locks up on me requiring me to kill all windows. This is repeatable 100% of the time. IE 11 doesn't seem to have this problem. One odd thing is that the name of the project listed in the pull down in the upper right corner is "Greenville Oaks Church of Christ", different than the project label or project name. I can't remember anymore how I created this and can't seem to find anything that will let me edit or delete it.
Using the Java API, I am able to successfully authenticate using the downloaded OAuth JSON file, where the service account ID is the client_email "[email protected]" without specifying a service account user and using https://www.googleapis.com/auth/mapsengine as the scopes. The credentials created are used (indirectly) to create the MapsEngine.
Calling the Java API to get the list of projects translates into an HTTP GET of mapsengine/v1/projects which returns an HTTP 200 status code and a JSON object reflecting that I don't have any projects readable to me:
CONFIG: {
"projects": []
}
Any ideas of where I'm going wrong or what I can do to resolve this issue? I can't use any subsequent API (like creating a table) because when I do, it fails telling me that the projectId does not exist.
Thanks in advance!
Upvotes: 0
Views: 92
Reputation: 841
I figured this out after a bit of luck. Go to
https://mapsengine.google.com/admin
and on the right hand side there is a gear icon with a pull down selection. Choose "Manage Users". From there, add the client_email. This is the Google APIs service account found at
https://cloud.google.com/console
under the permissions tab.
Upvotes: 0