Learn business growth with Google Analytics 4 Forums Google Analytics 4 Troubleshooting Service Account Authentication for GA4 Analytics Data API Reply To: Troubleshooting Service Account Authentication for GA4 Analytics Data API

  • Brooke

    Member
    12 May 2023 at 10:29 am

    It looks like your issue is related to the authentication scopes you’re using for your requests. The error message is saying that you don’t have the right permissions to do what you are trying to do.

    So, you have to use either the ‘https://www.googleapis.com/auth/analytics.readonly’ or the ‘https://www.googleapis.com/auth/analytics’ scope when you authenticate.

    Once you switch to either of these scopes, give it another shot and you should be good to go!