Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics API - no Registered origin

i need to request google analytics readonly api

but i have some troubles :

Erro:invalid_client
 no registered origin
Detalhes da solicitação
scope=https://www.googleapis.com/auth/analytics.readonly
response_type=token
access_type=online
redirect_uri=postmessage
proxy=oauth2relay906123469
origin=https://bob.tricae.com.br/
state=450098374
display=page
prompt=none

my cliend_id is correct i get it from:

google.com/apis/console/#project

someone can help me with that?

like image 899
Markomafs Avatar asked Dec 11 '12 20:12

Markomafs


People also ask

How do I authenticate Google Analytics?

Click on Authenticate button to open the authentication popup. Choose or login to your Google account,which you wish to connect with Google Analytics WD plugin. The popup window will ask for relevant permissions. Click Allow, then copy the authentication code which will be provided subsequently.

Can we get data from Google Analytics API?

The API allows you in a single request to get data in two date ranges. The API has a rich vocabulary to request Cohort and Lifetime value reports. The API enables you to get multiple segments in a single request.

How do I find my Google Analytics access token?

Note: The user must complete a one-time auth flow to grant your application offline access to their Google Analytics data. Afterwards, a refresh token can be used to obtain a new access token.


2 Answers

In my experience, you have to create a web application client ID. For example, if I create a "service" client ID, there isn't any place to put "Authorized JavaScript Origins," but if I create a new "web application" client ID under my project, then it has a place for that. Once I created the client ID that way, then it accepted it.

like image 193
Nickadoo Avatar answered Nov 09 '22 20:11

Nickadoo


Pretty sure you need to go to https://code.google.com/apis/console/ and add your page (the url at https://bob.tricae.com.br/ ) to the client ID on the API Access tab. Click Edit Settings... on the right hand side then fill it in under "Authorized JavaScript Origins" (assuming you're using the Javascript client library).

like image 35
Rob Russell Avatar answered Nov 09 '22 21:11

Rob Russell