Question

I am currently developing an app for Google+. Is there any way to fetch/search public data with out user authentication, I mean, using an app access token

https://www.googleapis.com/oauth2/v1/activities

No correct solution

OTHER TIPS

Yes, see https://developers.google.com/+/api/oauth#apikey which talks about using an API Key instead of using a user login.

Quoting that page:

For Google+ API calls that do not need to identify a particular user, you can use your application API key. This is useful for server-side applications, or web applications that do not require the user to sign in with Google.

[...]

After you have an API key, your application can append the query parameter key=yourAPIKey to all request URLs. The API key is safe for embedding in URLs; it doesn't need any encoding.

You can get the API key via the new Developers Console by going to http://console.developers.google.com/ and selecting your project, then clicking on the APIs & auth tab on the left and then Credentials. There should be a section on the right Public API Access with a button to press to create a new key if one doesn't already exist.

Still no luck,

Here is the response :

Array ( [url] => https://www.googleapis.com/oauth2/v1/activities?query=stackoverflow&maxResults=100&orderBy=recent&key=54XXXXXXX4723.apps.googleusercontent.com [content_type] => text/html; charset=UTF-8 [http_code] => 404 [header_size] => 390 [request_size] => 262 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.813163 [namelookup_time] => 0.411874 [connect_time] => 0.454496 [pretransfer_time] => 0.605186 [size_upload] => 0 [size_download] => 9 [speed_download] => 11 [speed_upload] => 0 [download_content_length] => -1 [upload_content_length] => 0 [starttransfer_time] => 0.813109 [redirect_time] => 0 [certinfo] => Array ( )

[primary_ip] => XXX.XXX.XXX.XX
[primary_port] => 443
[local_ip] => 192.XXX.XXX.XXXX
[local_port] => 52227
[redirect_url] => 

)

The answer around the key is correct for general public access. However, the URL you are using is not correct. You want the activities list API I suspect: https://developers.google.com/+/api/latest/activities/list

GET https://www.googleapis.com/plus/v1/people/{userId}/activities/public?key={YOUR_KEY}

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top