gapi account data url goes to 404

后端 未结 4 785
孤城傲影
孤城傲影 2021-01-19 07:50

Does anyone know the new account data url used by the GAPI 1.3.1 class? The current one is

https://www.google.com/analytics/feeds/accounts/default but it goes to a

相关标签:
4条回答
  • 2021-01-19 08:00

    While using GAPI 1.3.1, you can request a list of accounts available to the user by calling the list method for accounts. In PHP this will look like:

    try {
        $accounts = $analytics->management_accounts->listManagementAccounts();
    } catch (apiServiceException $e) {
        print 'There was an Analytics API service error ' . $e->getCode() . ':' . $e->getMessage();
    } catch (apiException $e) {
        print 'There was a general API error ' . $e->getCode() . ':' . $e->getMessage();
    }
    

    See https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtAccountGuide for more details about querying the GA Management API with GAPI.

    0 讨论(0)
  • 2021-01-19 08:01

    Account data url: https://www.googleapis.com/analytics/v2.4/management/accounts/~all/webproperties/~all/profiles

    Report data url: https://www.googleapis.com/analytics/v2.4/data

    0 讨论(0)
  • 2021-01-19 08:02

    See Account Feed Shutdown

    The Data Export API v2.3 migration has completed and the API has been shutdown. If your application attempts to access the Account Feed it will now receive a 404 error response. To resolve this error, migrate to the Management API to access configuration data.

    0 讨论(0)
  • 2021-01-19 08:15
    • Go to : https: // code.google.com /apis/console/
    • Login and create a new project
    • Turn on Analytics API
    • Click on Analytics API link and then in the left menu choose API Access
    • Note down the API Key (Key for browser apps )

    Then inside your code, where you had: https: // www.google.com/ analytics/feeds/accounts/default will be replaced with: https:// www. googleapis.com/ analytics /v2.4/management/accounts

    There is one more change to do. Each call for info will have to also include the API Key as a GET param named key

    Example: https://www.googleapis.com/analytics/v2.4/management/accounts?start-index=1&max-results=100&key=API_KEY

    I am sorry, I am new here and I can't paste links yet. Hope to get better :)

    0 讨论(0)
提交回复
热议问题