If I have api key of Business API, i just want example of URL, like how to put the place id and api key.
If Google have authorized you to use Google Business API then you need to
Your Http Get request must have Access Token
For Example: https://mybusiness.googleapis.com/.../reviews??access_token={tokenHere}
this will return you all the reviews.
Ref: https://developers.google.com/my-business/reference/rest/v4/accounts.locations.reviews
Hope that answered your Question.
*Please note, support of v3 of the API ended on March 10, 2018; v3 will no longer be available on May 10th 2018. So we encourage you to migrate to v4.1 as soon as possible to prevent any interruption in functionality. In addition, the deprecation schedule can be found here
You can get Google My business (GMB) reviews in same ways
Please find the below working code for review reply with PHP HTTP request
$access_token = "<your_access_token_here>";
$query = array('comment' => 'Thank you for visiting our business!');
$request_uri = "https://mybusiness.googleapis.com/v4/accounts/111050869667910417441/locations/17405754705905257334/reviews/AIe9_BFu3rdicGrPrzdyu4PDXmqMAu-9BCJf9_HF0DxzGxsjAGw5KGl1XsdqSkbsAMdl_W2XBG4bwO3wCp0_l_8KLAV7mckl5cSyJItwPqSYGiH3ktK6nrI/reply?access_token=" . $access_token;
$curinit = curl_init($request_uri);
curl_setopt($curinit, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curinit, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($curinit, CURLOPT_POSTFIELDS, json_encode($query));
curl_setopt($curinit, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curinit, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen(json_encode($query)))
);
$json = curl_exec($curinit);
$phpObj = json_decode($json, true);
var_dump($phpObj);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With