Access Token for REST connection to Google Analytics

Hi,

Helping a client with a google analytics to NetSuite flow. The GA export is using the REST connector. The user that created it and had access was removed from their google account and so the connection is now getting authorization failures.  Any clues where to go in Google to setup a new user with access to this project? The current REST connection is setup to use Token access with refresh enabled. 

Thanks.  

0

Comments

2 comments
Date Votes
  • Hi David Gollom,

    1. In Google Developers, you'll need to enable access to Analytics for your project. You'll need to do this twice as there are 2 sets of APIs to add: Google Analytics API and Google Analytics Reporting API. In API & Services, go to Library > API Library.
    2. Go to Credentials > Create Credentials. From the Create credentials drop-down button, choose OAuth client ID. Click the Configure consent screen button if necessary (if you don't already have your application added).
    3. If you already have your app, skip to step 6. If not, specify the Application name and Support email values.
    4. Click the Add scope button. Select all of the scopes, then Save
    5. Create your OAuth client ID. In the Create OAuth client ID page, choose Web application, then specify the Name.
    6. In the Authorized redirect URIs section, specify either http://localhost.com or https://localhost.com.
    7. Click Create. This will give you your Client ID and Client secret. You now have an app that will allow integrator.io to access your information. Make sure to copy these somewhere safe.
    8. To get your OAuth token, use this URL: https://accounts.google.com/o/oauth2/auth?response_type=code&state=12121&redirect_uri=https://localhost&client_id=<client_id>&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics.edit https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics.manage.users https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics.manage.users.readonly https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics.provision https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics.readonly&access_type=offline&prompt=consent
    9. Replace <client_id> with the Client ID you created in step 7. Remove the brackets. 
    10. Copy the URL string and paste it into your browser. You'll be prompted to choose the account to sign in with. Choose the account, then click Allow. If you get a uri_redirect error, make sure that after localhost in the URL, there is no forward slash (/).
    11. You'll get a "This app isn't verified" error. Click the Advanced link, then click to Go to <your app name> (unsafe) link at the bottom of the dialog.
    12. You'll need to click Allow for each of the scopes you selected earlier.
    13. When this is done, you should be directed to your localhost URL. Copy the e URL up to the end of the code value and put it somewhere safe. Don't include the & after the code value in the URL.
    14. You've already got an OAuth token, but the next step would be to generate an OAuth token (such as in Postman) using https://accounts.google.com/o/oauth2/token. 

    Let us know if you need more information!

    0
  • Thanks. i'll give this a try. 

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post