Here is the question in a bit more detail.
I have a tool that utilizes the Analytics API(s) to provision client accounts.
The basic workflow is:
1) sign into a client's email address.
2) generate an auth code.
3) generate a temporary auth token using the auth code.
4) using the auth token, hit this end point "
https://www.googleapis.com/analytics/v3/provisioning/createAccountTicket" and grab the account ticket id.
5) using account ticket id, redirect the user to this url "
https://www.google.com/analytics/web/#management/TermsOfService//?api.accountTicketId=" plus the account ticket id.
6) the user accepts, and the google redirects back to my page (redirect_uri), thus ending the program.
Now, for email addresses that have > 0 Analytics accounts, google actually sends me to the Terms of Service page, where I can then click accept, and finish the program.
But for email addresses that have 0 Analytics accounts, google is
302ing me to this url:
"
https://www.google.com/analytics/web/provision?et=&authuser=#provision/SignUp/".
I can create a "dummy" account, then run the program again, and everything is aces.
FireFox Console results difference showing 302 redirect:NOT WORKING EXAMPLE:
GET
https://www.google.com/analytics/web/#management/TermsOfService// [HTTP/2.0 302 Found 253ms]
GET
https://www.google.com/analytics/web/provisionWORKING EXAMPLE:
GET
https://www.google.com/analytics/web/#management/TermsOfService// [HTTP/2.0 200 OK 749ms]
Same results for Chrome and Firefox.
Devguide (User Accepts TOS)
createAccountTicketThis is obviously frustrating because the tool is meant to take away the
need to manually set up an Analytics account. But, in order for it to
work correctly, per the APIs specs, I have to manually set up account,
thus negating the tools usefulness.
Can anyone shine any light on this? Thanks!