A
A
Anna Bakurova2014-05-12 09:37:31
Google
Anna Bakurova, 2014-05-12 09:37:31

Why is ajax request for Google+ throwing an error?

I'm trying to get the number of shares through ajax, but it gives me an error. I substituted the key for the second word key
Error 403 (Access Not Configured. Please use Google Developers Console to activate the API for your project.)

$.getJSON('https://clients6.google.com/rpc?',
        {
           "method":"pos.plusones.get",
           "id":"http://test.cuberto.ru",
           "params":{
              "nolog":true,
              "id": 'http://test.cuberto.ru',
              "source":"widget",
              "userId":"@viewer",
              "groupId":"@self"
           },
           "jsonrpc":"2.0",
           "key":"key",
           "apiVersion":"v1"
        },
        function(data){
        	var cart = JSON.parse(data.result);
        	alert(cart);
     	}
     );


What api needs to be activated?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mayorovp, 2014-05-12
@mayorovp

It is written in English:

Access Not Configured. Please use Google Developers Console to activate the API for your project

You need to go to the Google Developers Console and enable the API that you are going to use.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question