--
You received this message because you are subscribed to the Google Groups "Excel Liberation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excel-ramblin...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
With .add("ua web properties").add "restType", erSingleQuery.add "results", "items".add "treeSearch", True.add "ignore", vbNullString.add "authType", erOAUTH2.add "authScope", "analytics".add "append", "/webproperties"End With
The crest class does all the token stuff, getting whatever you have in the registry and adding analytics scope, and will refresh if necessary.If job.value = erOAUTH2 Then' need to authorize and get tokenSet oa = getGoogled(cj.child("authScope").value)later on the cbrowser class passes the token to analytics API' this would be if we were doing an oauth2If (authHeader <> vbNullString) Thenohttp.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"ohttp.SetRequestHeader "Authorization", authHeaderEnd If
bruce
Hi Bruce,
Thanks for the link -- I will definitely check it out. Before seeing your reply I managed to get the token and get a response back by importing the required modules into my spreadsheet one-by-one from cDataSet until getGoogled() worked :-).The bad news is that the response is not what I was expecting:
I did add xxxxxx...@developer.gserviceaccount.com as a user with all permissions enabled in my Google Analytics admin panel, so not sure why it's giving me this error (this email is also included in the Google Developers Console).Could it be that I'm using the wrong profile ID? The number I'm using in ga:xxxxxx is my Google Analytics account ID, but I'm not sure if that is correct.Tom