Learn business growth with Google Analytics 4 Forums Google Analytics 4 Authenticating Google Analytics API with user credentials instead of service accounts Reply To: Authenticating Google Analytics API with user credentials instead of service accounts

  • Connor

    Member
    30 June 2023 at 1:13 am

    It seems like you are facing difficulties in authenticating and accessing Google Cloud using individual user credentials for your Google Analytics property. The error message from ‘gcloud auth application-default login’ suggests that the authentication scopes might not be properly set. The article you mentioned suggests creating an OAuth Client ID, which involves additional scopes while linking to the OAuth File. However, you received another error stating that the Google Analytics Data API hasn’t been activated for your project. Furthermore, the project linked does not exist in your Google Cloud but corresponds to the OAuth Client ID instead. This seems confusing indeed. You might have to consider checking the Google Cloud project ID, verifying whether the Analytics Data API is enabled or not, and reconfiguring the OAuth Client ID. Also ensure the scopes are correctly set during the authentication process.