පුරනය වන්නනොමිලේ trial කාලය ආරම්භ කරන්න
easyCoexistence නිල API

Python සහ Node සමඟ Google Business Profile API: සමාලෝචන ලැයිස්තුගත කර පිළිතුරු දෙන්න

Python හෝ Node වලින් Google සමාලෝචන ලැයිස්තුගත කර පිළිතුරු දීම සඳහා, Basic API Access අනුමත කළ ඔබේම Google Cloud project එකක් භාවිතා කරන්න. business.manage scope සඳහා OAuth මගින් පුරනය වී, ගිණුමේ සහ ස්ථානයේ නම් සොයා, GET .../reviews සහ අදහසක් සහිත PUT .../reviews/{reviewId}/reply අමතන්න. කේතයක් නොමැතිව, easyCoexistence මගින් ChatGPT හෝ Claude ට MCP server හරහා එම වැඩ කළ හැකිය, ඔබ සෑම පිළිතුරක්ම අනුමත කරයි.

තමන්ගේම project

Google හි API ප්‍රතිපත්තීන් අනුව, Business Profile ක්‍රමලේඛනව භාවිතා කරන ඒජන්සි සහ අවසාන ගනුදෙනුකරුවන් ඔවුන්ගේම Business Profile project එකක් භාවිතා කළ යුතුය.

business.manage

Business Profile APIs සඳහා අවශ්‍ය OAuth scope: https://www.googleapis.com/auth/business.manage.

0 to 300 QPM

Basic API Access සඳහා අයදුම්පත Google අනුමත කිරීමට පෙර සහ පසු project එකක Business Profile API quota.

4,096 bytes

පිළිතුරක comment හි උපරිම දිග.

සත්‍යාපිත

updateReply, එනම් පිළිතුරක් සාදන හෝ වෙනස් කරන ඇමතුම, ස්ථානය සත්‍යාපනය වූ විට පමණක් වලංගු වේ.

Sandbox නැත

Business Profile APIs සඳහා Google හි sandbox නොමැත; සමහර ඇමතුම් validateOnly ගෙන, වෙනසක් නොකර ඉල්ලීම පරීක්ෂා කළ හැකිය.

ඔබට තමන්ගේම Google Cloud project එකක් අවශ්‍ය වන්නේ ඇයි?

මන්ද Google හි Business Profile API ප්‍රතිපත්තීන් පවසන්නේ “ඒජන්සි හෝ අවසාන ගනුදෙනුකරුවන් විසින් Business Profile ස්වයංක්‍රීය හෝ ක්‍රමලේඛනගත ලෙස භාවිතා කිරීම, ඔවුන්ගේම Business Profile project එකක් භාවිතා කිරීම අවශ්‍ය කරයි” කියායි. සමාලෝචන කියවන හෝ පිළිතුරු පළ කරන කේතය ක්‍රමලේඛනගත භාවිතයක් වන බැවින්, එය ඔබ සතු සහ Google අනුමත කළ Cloud project එකක ධාවනය වේ, කිසි විටෙක වෙනත් සමාගමක project හෝ API හරහා නොවේ. Google එම ප්‍රවේශය project එකෙන් project එකට ලබා දෙන අතර, project එකට ප්‍රවේශ ඇති ඕනෑම පරිශීලකයෙකුට ඉන්පසු APIs ඇමතිය හැක.

Google API ඇමතීමට පෙර ඔබට කුමක් අවශ්‍යද?

සතර දෙයක්, ඒ සෑම එකක්ම ඔබේම Google ගිණුම සහ project එකේ සකසා ඇත:

  • Basic API Access සඳහා අනුමත Cloud project එකක්, පැතිකඩේ හිමිකරු හෝ කළමනාකරු වන ඊමේල් ගිණුමකින් Google හි GBP API සම්බන්ධතා පෝරමය හරහා ඉල්ලා ඇත. ඒ දක්වා quota 0 QPM වේ.
  • Cloud console හි සක්‍රීය කළ Business Profile APIs. මෙම කේතය තුනක් භාවිතා කරයි: සමාලෝචන තබන Google My Business API, My Business Account Management API සහ My Business Business Information API.
  • Desktop යෙදුම් වර්ගයේ OAuth client එකක්, script එක අසල credentials.json ලෙස සුරකින ලද. යෙදුමේ audience External වී Testing තත්ත්වයේ නම්, ඔබේ Google ගිණුම test user ලෙස එකතු කරන්න.
  • බ්‍රව්සරය විවෘත වන විට පුරනය වීමට, ස්ථානය හිමි හෝ කළමනාකරණය කරන Google ගිණුමක්.

කුමන Google endpoints මගින් සමාලෝචන ලැයිස්තුගත කර පිළිතුරක් පළ කරයි?

පළමු ඇමතුම් දෙක Google ඉල්ලන resource names සොයයි: accounts/{accountId} සහ locations/{locationId}. ඉන්පසු reviews ඇමතුම් accounts/{accountId}/locations/{locationId} යටතේ ක්‍රියා කරයි. ඒවා සියල්ලටම business.manage scope අවශ්‍ය වන අතර, v4 ඇමතුම් පිටුපස ඇති Google My Business API, Google ඔබේ ප්‍රවේශ ඉල්ලීම අනුමත කළ පසු පමණක් Cloud console හි දිස්වේ.

accounts.listGET mybusinessaccountmanagement.googleapis.com/v1/accounts: accounts you own or manage, your personal account first
accounts.locations.listGET mybusinessbusinessinformation.googleapis.com/v1/{account}/locations, with readMask required
accounts.locations.reviews.listGET mybusiness.googleapis.com/v4/{account}/{location}/reviews: up to 50 a page, updateTime desc by default
accounts.locations.reviews.updateReplyPUT .../reviews/{reviewId}/reply with a comment: creates the reply, or updates the one there
accounts.locations.batchGetReviewsPOST .../v4/{account}/locations:batchGetReviews: up to 50 verified locations a call

Python හි සමාලෝචන ලැයිස්තුගත කර පිළිතුරු දෙන්නේ කෙසේද?

Google හි auth library සහ සරල HTTPS ඇමතුම් භාවිතා කරයි. Script එක Google පුරනය වීම සඳහා බ්‍රව්සරය විවෘත කරයි, සෑම සමාලෝචනයක්ම එහි id සහ තරු ශ්‍රේණිය සමඟ මුද්‍රණය කරයි, ඉන්පසු කුමන එකට පිළිතුරු දිය යුතුද සහ කුමන පෙළින්ද ඇසයි. එබැවින් පුද්ගලයෙක් එය ටයිප් කරන තෙක් කිසිවක් පළ නොවේ.

reviews.py: Google's API with OAuth
# pip install google-auth-oauthlib
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import AuthorizedSession

SCOPES = ["https://www.googleapis.com/auth/business.manage"]
flow = InstalledAppFlow.from_client_secrets_file("credentials.json", SCOPES)
google = AuthorizedSession(flow.run_local_server(port=0))

# accounts[0] is your personal account; pick another from the list if the location sits elsewhere
account = google.get("https://mybusinessaccountmanagement.googleapis.com/v1/accounts").json()["accounts"][0]["name"]
location = google.get(
    f"https://mybusinessbusinessinformation.googleapis.com/v1/{account}/locations",
    params={"readMask": "name,title"},
).json()["locations"][0]["name"]
reviews_url = f"https://mybusiness.googleapis.com/v4/{account}/{location}/reviews"

for r in google.get(reviews_url).json().get("reviews", []):
    print(r["reviewId"], r["starRating"], r.get("comment", ""), "(replied)" if "reviewReply" in r else "")

review_id = input("Review id to answer: ")
text = input("Reply, as the owner approved it: ")
google.put(f"{reviews_url}/{review_id}/reply", json={"comment": text}).raise_for_status()

Node හි එම දේම කරන්නේ කෙසේද?

Google හි local-auth package සමඟ, එය එම බ්‍රව්සර් පුරනය විවෘත කර, endpoints ඕනෑම එකක් ඇමතිය හැකි request method එකක් සහිත authorized client එකක් ලබා දෙයි. Python එකේ මෙන්ම script එක සමාලෝචන ලැයිස්තුගත කර, ඉන්පසු සමාලෝචන id එකක් සහ අනුමත පෙළ ඉල්ලයි. top-level await ක්‍රියා කිරීමට එය .mjs ලෙස සුරකින්න.

reviews.mjs: Google's API with OAuth
// npm install @google-cloud/local-auth   then: node reviews.mjs
import path from "node:path";
import readline from "node:readline/promises";
import { authenticate } from "@google-cloud/local-auth";

const google = await authenticate({
  scopes: ["https://www.googleapis.com/auth/business.manage"],
  keyfilePath: path.resolve("credentials.json"),
});
const get = async (url) => (await google.request({ url })).data;

// accounts[0] is your personal account; pick another if the location sits elsewhere
const { accounts } = await get("https://mybusinessaccountmanagement.googleapis.com/v1/accounts");
const account = accounts[0].name;
const { locations } = await get(
  `https://mybusinessbusinessinformation.googleapis.com/v1/${account}/locations?readMask=name,title`
);
const reviewsUrl = `https://mybusiness.googleapis.com/v4/${account}/${locations[0].name}/reviews`;

const { reviews = [] } = await get(reviewsUrl);
for (const r of reviews) console.log(r.reviewId, r.starRating, r.comment ?? "", r.reviewReply ? "(replied)" : "");

const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
const reviewId = await rl.question("Review id to answer: ");
const comment = await rl.question("Reply, as the owner approved it: ");
rl.close();
await google.request({ url: `${reviewsUrl}/${reviewId}/reply`, method: "PUT", data: { comment } });

කේතය පිළිතුරු දීමට පෙර පුද්ගලයෙකු බලා සිටින්නේ ඇයි?

මන්ද Google හි ප්‍රතිපත්තීන් පවසන්නේ “පරිශීලකයාගේ පෙර නිශ්චිත හා පැහැදිලි අවසරයකින් තොරව සමාලෝචන පිළිතුරු, Q&A, ලැයිස්තු නිර්මාණ, ලැයිස්තු සංස්කරණ හෝ වෙනත් ක්‍රියා ස්වයංක්‍රීය කිරීම හෝ ප්‍රේරණය කිරීම නොකළ යුතුය” කියායි. ගනුදෙනුකරුවෙකු වෙනුවෙන් පිළිතුරු දෙන ඒජන්සියක් මුලින් ගනුදෙනුකරුගේ අවසරය ලැබිය යුතුය. පිළිතුරක් ද පොදුය: Google අනුමත කළ පසු, එය ව්‍යාපාරය ලෙස සමාලෝචනය යටතේ දිස්වන අතර, කිසිවකුගේ පෞද්ගලික නමක් නොමැතිව, සමාලෝචකයා දැනුම් දෙනු ලැබේ.

කේතයක් නොමැතිව එම වැඩ කරන්නේ කෙසේද?

easyCoexistence හරහා පුරනය වී ඉල්ලන්න. එහි dashboard එකේ “New connection” තෝරන්න, ඉන්පසු Google Business තෝරා, පැතිකඩේ හිමිකරු හෝ කළමනාකරු ලෙස Google සමඟ පුරනය වන්න, ඉන්පසු https://easycoexistence.com/api/mcp ChatGPT හෝ Claude වෙත එකතු කරන්න. පිළිතුරු නොමැතිව සමාලෝචන ඉල්ලන්න: සහායකයා list_google_reviews ඇමතුම් කර, සෑම එකකටම කෙටුම්පතක් සාදා, සෑම කෙටුම්පතක්ම ඔබට පෙන්වා, ඔබ අනුමත කරන ඒවා සඳහා පමණක් reply_to_google_review ඇමතුම් කරයි. delete_google_review_reply පිළිතුරක් ඉවත් කරයි, සමාලෝචනය තබා ගනී. නිතර ඉල්ලීමෙන් තොරව නව සමාලෝචනවලට පිළිතුරු දීමට, dashboard එකේ review automation එකක් ක්‍රියාත්මක කරන්න: එය ස්ථිර පෙළකින් හෝ ඔබේම AI එකෙන් පිළිතුරු දෙයි, නැතහොත් සෑම නව සමාලෝචනයක්ම ඔබේ webhook එකට යවා එය ආපසු දෙන පිළිතුර පළ කරයි.

එය සකසන ආකාරය

  1. project එකක් සාදන්නGoogle Cloud project එකක් සාදා, එහි project අංකය සටහන් කර, GBP API contact form එක Google වෙත යවන්න. Basic API Access සඳහා Application තෝරන්න.
  2. APIs සක්‍රිය කරන්නquota එක 300 QPM ලෙස පෙන්වන විට, Cloud console හි Business Profile APIs සක්‍රිය කරන්න.
  3. OAuth client එකක් සාදන්නDesktop app OAuth client එකක් සාදා, එහි JSON එක script එක අසල credentials.json ලෙස සුරකින්න.
  4. ධාවනය කර පුරනය වන්නPython හෝ Node script එක ධාවනය කර, ස්ථානය හිමි හෝ කළමනාකරණය කරන Google ගිණුමකින් පුරනය වන්න.
  5. එක් review එකකට පිළිතුරු දෙන්නලැයිස්තුවෙන් review id එකක් තෝරා, හිමිකරු අනුමත කළ පිළිතුර ටයිප් කරන්න.

සාමාන්‍ය වැරදි

  • 0 QPM දී quota වැඩි කිරීම ඉල්ලීම. Google හි සීමා පිටුව පවසන්නේ quota 0 යනු ප්‍රවේශය තවම ලබා නොදුන් බවයි, එබැවින් ඒ වෙනුවට Basic API Access සඳහා අයදුම්පත ඉදිරිපත් කරන්න.
  • locations ඇමතුමේදී readMask අතහැරීම. Business Information API එය අනිවාර්ය ලෙස සලකුණු කරයි, එබැවින් අවම වශයෙන් readMask=name,title යවන්න.
  • සජීවී සමාලෝචනයකට reply ඇමතුම පරීක්ෂා කිරීම. Business Profile APIs සඳහා sandbox නොමැත, එබැවින් පරීක්ෂණ පිළිතුරක් ව්‍යාපාරයෙන් එන සැබෑ, පොදු පිළිතුරක් වේ.
  • 4,096-byte පිළිතුරු සීමාව අක්ෂර වලින් මැනීම. උච්චාරණ අක්ෂර සහ emoji සෑම එකක්ම byte කිහිපයක් ගනී, එබැවින් කෙටි පෙනෙන පිළිතුරක් තවමත් ප්‍රතික්ෂේප විය හැක.
EasyCoexistence සමඟ මෙය කිරීම

easyCoexistence යනු එම වැඩට කේතයක් නොමැති මාර්ගයයි: Google පුරනය සමඟ ස්ථානයක් සම්බන්ධ කර, එහි MCP server ChatGPT හෝ Claude වෙත එකතු කර, පිළිතුරු නොමැති සමාලෝචන ඉල්ලන්න. සහායකයා පිළිතුරු කෙටුම්පත් කරයි, ඔබ අනුමත කරන ඒවා පමණක් පළ කරයි. සමාලෝචන Google වෙතින් සජීවීව කියවන අතර කිසිවිට ගබඩා නොකරයි. නැතහොත් නව සමාලෝචනවලට තනිවම පිළිතුරු දීමට එහි dashboard එකේ review automation එකක් ක්‍රියාත්මක කරන්න. සම්බන්ධතාවයකට මාසිකව US$ 9 සිට US$ 0.75 දක්වා, සම්බන්ධතා එකතු කරන විට අඩු වේ, පළමු දින 3 නොමිලේ.

Google Business Profile ChatGPT සහ Claude වෙත සම්බන්ධ කරන්න

නිතර අසන ප්‍රශ්න

403 දෝෂය ස්ක්‍රිප්ට් එකට ලැබෙන්නේ ඇයි?

Google හි setup මාර්ගෝපදේශය එක් හේතුවක් නම් කරයි: Google Workspace ගිණුමක Business Profile ක්‍රියාවිරහිත විට ඇමතුම් 403 PERMISSION DENIED සමඟ අසාර්ථක වේ. ස්ක්‍රිප්ට් ඇමතුම් කරන APIs තුන ඔබේ project මත සක්‍රීය දැයි ද පරීක්ෂා කරන්න.

සමාලෝචන 50කට වඩා ලැයිස්තුගත කරන්නේ කෙසේද?

page token එක අනුගමනය කරන්න. reviews.list එක පිටුවකට උපරිම සමාලෝචන 50ක් ලබා දෙයි. තවත් ඉතිරි නම්, සෑම පිළිතුරකම nextPageToken එකක් ඇත, එය ඊළඟ ඉල්ලීමේදී pageToken ලෙස යවන්න.

සැබෑ ප්‍රොෆයිල් එකකට ස්පර්ශ නොකර පරීක්ෂා කරන්නේ කෙසේද?

Google හි පරීක්ෂණ ස්ථාන නොමැත: එහි API FAQ පවසන්නේ ව්‍යාජ ස්ථාන සාමාන්‍යයෙන් සලකුණු කර අත්හිටුවන බවයි. එය යෝජනා කරන්නේ ඔබේ සමාගමේ මූලස්ථානය සඳහා ස්ථානයක්, පසු වේලාවේ ක්‍රියා කරන ගනුදෙනුකරුවෙකුගේ ස්ථානයක් (නම, ලිපිනය හෝ කාණ්ඩය වෙනස් නොකර), නැතහොත් ව්‍යාජ API ප්‍රතිචාර වේ.

පිළිතුර සජීවී වූ බව කෙසේ දැනගන්නද?

සමාලෝචන නැවත ලැයිස්තුගත කර පිළිතුරේ reviewReplyState කියවන්න: PENDING, APPROVED හෝ REJECTED, ප්‍රතික්ෂේප වූවකට policyViolation සමඟ. reviews.get එම තත්ත්වය ඇතුළත් නොකරයි. Google හි පරීක්ෂාව සාමාන්‍යයෙන් මිනිත්තු 10ක් දක්වා, සමහර විට දින 30ක් දක්වා ගත වේ.

තවදුරටත් කියවන්න

Google Business Profile API (පැරණි නම Google My Business API): සම්පූර්ණ මාර්ගෝපදේශය2026 හි Google Business Profile API: API පවුල, ප්‍රවේශය, business.manage scope, quota, කාර්ය සඳහා endpoint සහ Google ඉවත් කළ දේ.Google සමාලෝචන API: සමාලෝචන කියවා පිළිතුරු දෙන ආකාරයBusiness Profile API සමඟ සමාලෝචන ලැයිස්තුගත කර, පිළිතුරු දී ඒවා මකන්න: endpoint, fields, බයිට් 4,096 සීමාව සහ moderation.Google Business Profile posts API හරහා පළ කරන ආකාරයlocalPosts API මගින් Google Business Profile හි යාවත්කාලීන, සිදුවීම් සහ දීමනා පළ කරන්න: වර්ග, බොත්තම්, ඡායාරූප සහ තත්ත්ව.Google Business Profile API එකට ප්‍රවේශය ප්‍රතික්ෂේප වී හෝ තවමත් පොරොත්තුවෙන්: ඔබට කළ හැකි දේApps සහ scripts Google අනුමතය බලා සිටිය යුතුය හෝ නැවත ඉල්ලිය යුතුය: කෙටි මගක් නැත. ඒ අතරේ, අනුමත tool එකෙන් ChatGPT හෝ Claude සමඟ ඔබේ profile එක මත වැඩ කරන්න.

ඔබේ පළමු channel එක මිනිත්තු දෙකකින් සම්බන්ධ කරන්න.

වේදිකා සමාලෝචන සඳහා බලා සිටීමට අවශ්‍ය නැත. WhatsApp, Instagram, TikTok හෝ වෙනත් channel එකක් සම්බන්ධ කර, පසුව ඔබේ AI හට පළ කිරීමට, ප්‍රතිචාර දැක්වීමට හෝ වාර්තා කිරීමට පවසා එය වැඩ කරන ආකාරය බලන්න.

  • දින 3ක් නොමිලේ
  • ඕනෑම වේලාවක අවලංගු කරන්න
  • නිල API පමණි
  • 24/7 නිරීක්ෂණය කෙරේ

සත්‍යාපනය කළේ