Skip to content

Credentials fail with "Cloud Datastore API not enabled" #843

Closed

Description

@volgin

I use the same credentials to access Cloud Storage API and Cloud Datastore API. Both APIs are enabled for my project. The Cloud Storage works as expected. Datastore fails with:

com.google.datastore.v1beta3.client.DatastoreException: The Cloud Datastore API is not enabled for the project rebelplayercom, code=FAILED_PRECONDITION
    at com.google.datastore.v1beta3.client.RemoteRpc.makeException(RemoteRpc.java:126)
    at com.google.datastore.v1beta3.client.RemoteRpc.makeException(RemoteRpc.java:169)
    at com.google.datastore.v1beta3.client.RemoteRpc.call(RemoteRpc.java:89)
    at com.google.datastore.v1beta3.client.Datastore.lookup(Datastore.java:92)
    at com.google.gcloud.datastore.spi.DefaultDatastoreRpc.lookup(DefaultDatastoreRpc.java:137)

At least one more user reported the same problem yesterday on StackOverflow. He also claims that the Datastore API is enabled for his project.

Note that the API explorer shows v1beta2 for Cloud Datastore API, not v1beta3. Can it be the cause of this problem?

Activity

  1. ajkannan commented on Apr 3, 2016

    @ajkannan

    Hi @volgin, thanks for creating this issue. The latest version of our Datastore client library (version 0.1.7) uses Cloud Datastore v1beta3, which is not enabled by default for some users. Try enabling the v1beta3 API on the Developer's Console using this link.

    Even if you had the Datastore API enabled previously, it may be the v1beta2 version, which has recently been renamed to "Google Cloud Datastore API (v1beta2)" the Developer's Console. (As you mention, the v1beta2 version of the API is what appears on the API Manager home page's listing. Explicitly searching "Google Cloud Datastore API" using the search box should yield the newest version of the API.)

    Let me know if that solution works for you.

  2. volgin commented on Apr 3, 2016

    @volgin
    Author

    This API is not listed in popular APIs. In fact, the popular APIs show Cloud Datastore API, which links to v1beta2. I was able to find the "new" Datastore API only using the search field. I am sure you will fix this soon.

  3. ajkannan commented on Apr 4, 2016

    @ajkannan

    Yes, I've pinged people about when they plan to update that "popular APIs" link, and I'll keep tabs to see that it gets updated.

  4. aozarov commented on Apr 7, 2016

    @aozarov
    Contributor

    @ajkannan can we close the issue? Did the Datastore team completed the back-fill and "Cloud Datastore API" link now points to v1beta3?

  5. ajkannan commented on Apr 7, 2016

    @ajkannan

    The Datastore team merged in a change to update the link, but the link will only change for users once the next release of the Developer's Console is out. They said it should be released by today afternoon. Shall we keep the issue open until then?

  6. ajkannan commented on Apr 7, 2016

    @ajkannan

    Closing this as the API link change has been released.

  7. 7 remaining items

  8. added a commit that references this issue on Mar 30, 2026
  9. added a commit that references this issue on Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions