How to activate Google My Business v4.9 API? - php

I am currently working on the development on a website for a client, and they want to display their Google Reviews in the footer. I am using PHP client libraries to so, and I've created OAuth2.0 credentials to access the API.
From the Google APIs documentation I see that I need to use the "Google My Business v4.9" API to do so, in order to use the accounts.locations.reviews. See the following screenshot to know the one I want to use :
The problem is when I want to activate this API on my Google Cloud projet, I can find all the Google My Business API, but not the "v4.9" (I've tryied searching for "my business", "google my business", "v4.9", etc... but I still can't find it. Here is what I get :
I've tried accessing the service without activating any API, thinking that maybe the v4.9 API was maybe activated by default, but I get 403 error saying "SERVICE NOT ENABLED".
Has anyone encountered this problem, and do you know which API to call ? any piece of information would be really appreciated !
Thanks in advance !

After searching a little bit more in the API documentation, I've found out that in order to have access to Google My Business API, you need to submit a form about your business so that Google authenthificates it.
Otherwise, the API will not be visible in the APIs library for your project.
See : https://developers.google.com/my-business/content/basic-setup#enable-the-api
The link to the form : https://docs.google.com/forms/d/e/1FAIpQLSfC_FKSWzbSae_5rOpgwFeIUzXUF1JCQnlsZM_gC1I2UHjA3w/viewform

Related

Getting followers and following with Instagram APIs

I am studying to integrate Instagram into my app.But I have some confusion.
I found 2 API document: https://www.instagram.com/developer/ and https://developers.facebook.com/docs/instagram-api/. They have differences about supporting API Endpoints as well as how to use. So, what are they and what should we use the one for my app?
I need to get followers and following of user. But I could not found any APIs support for that functions.
Could you please help, I really need it for my app.
Thanks a lot
As of 1st of June 2016. Now you're only able to get the list of your
own followers/followings.
You can read about it here.
This api is used to get own followers/following list :
https://api.instagram.com/v1/users/self/follows?access_token=ACCESS-TOKEN
I was using the documentation found on the Instagram website, which will show you lots of end points but only let you use these two if your app has not been approved. At least that was the case until a few days ago, when accessing those endpoints started throwing off CORS errors.

How do i setup a api linkedin connection using oAuth and php

He there,
I am trying to get a grip on the API of linkedin. What i want to develop is a marketing-dashboard for clients with campagins and there analytics. The documentation on linkedin is not very helpfull (could be me thought). Do i have to be registered as a partner for this? And can anyone help me with some examplefiles or library based on PHP?
Unfortunately the Zoonman tutotial only shows the 'Authorization Code Flow'. For data of campagins and sponsered content on linkedin i need 'Client Credential Flow'. And as i suspected i do need to be partner first to be able to use the LinkedIn Marketing Developer Platform - API.

URL of Google PageSpeed API Scope

i have online tool that works with users based on oauth 2.0. I have access to their Google Analytics, etc.
The only one that i can't access is PageSpeed API because i don't know and can't find scope URL of this service.
For Google Analytics, for example, i use https://www.googleapis.com/auth/analytics.readonly scope etc. But it seems like PageSpeed api does'nt have any scope and is accessible only with user API key. But in that case i can't offer to my users Pagespeed insights for their pages (because one API key has only 50 000 queries/day).
I did'nt find even in Oauth playground on:
https://developers.google.com/oauthplayground/
Can you please help me how to solve this problem if i don't wanna press users to Google Developer Console?
Thank you!
PageSpeed API access works fine with just an API key (as mentioned in the Google Developers Console, see the subpage there for the PageSpeed API) which is also much easier to implement for the developer.
I think this is the case because one can by default run pagespeed for any given URL, so no need for a permission workflow as opposed to Google Analytics etc.
As answered above, it should work just fine with an api call. As per the Google PageSpeed Insights API.
This is your API URL for v2 of the API:
'https://www.googleapis.com/pagespeedonline/v2/runPagespeed?'
The current version however is, v4. So that looks like this: https://www.googleapis.com/pagespeedonline/v4/runPagespeed
Here's a sample function to call Pagespeed API, using v2:
def runPageSpeed(API_URL, API_KEY, input_url, insightstrategy):
query = [
'url=' + input_url,'filter_third_party_resources=true',
'key='+api_key, 'strategy='+insightstrategy] #insight strategy is either 'desktop' or 'mobile'
src = API_URL + '&'.join(query)
return src
P.S: you will need API Key, which you can generated under Google Developers, in order to run it. Also the following packages: (as per I checked last):
google python api client
requests
Try this and And you should be good. No need for oauth.

Google Hangouts in my website as a chat/messaging system

I currently have Google OAuth 2.0 for authentication. Next I want to be able to use google hangouts in my website so users can chat with each other, along with showing their contact list. So basically I want it to look like how it is on gmail but on my website for hangouts. Main reason for doing this, I want my users to be able use hangouts as a mode of communication. Please let me know if this is possible and provide the necessary resources, an example/demo of this working would really be helpful.
Im afraid there's no API at the moment available (nor plans for that) to access the text chat feature of Hangouts.
yes, you can. More information about google hangouts API here https://developers.google.com/+/hangouts/getting-started

Twitter REST API, update status?

I am wanting to allow a user to update their twitter status from my website. I was planning on using Twitter's #anywhere feature, but this was not a very friendly solution:
Take over 3 seconds to load
Makes 14 requests
Calls jQuery twice
Then I found the Twitter REST API: https://dev.twitter.com/docs/api
Using OAuth, I want the user to be able to login, and then update their status using that API. I've been trying to find tutorials on this, but I haven't found any that use the REST API to update the Twitter Status.
Does anyone have code for/know of a tutorial for what I'm looking for?
Just post the data to update api endpoint.
You can read twitter update api doc for details : https://dev.twitter.com/docs/api/1/post/statuses/update
And there is a open source twitter client written in PHP, named dabr. http://code.google.com/p/dabr/
Adam Green has a nice tutorial in PHP that walks you through everything from setting up your application on the Twitter developer site to posting your first tweet.

Categories