<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Zsolt László</title>
    <description>The latest articles on DEV Community by Zsolt László (@zsolt_lszl_9d00af94fd2a).</description>
    <link>https://dev.to/zsolt_lszl_9d00af94fd2a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3504342%2F53e95a1d-2c42-4e20-9685-3cf726419a72.png</url>
      <title>DEV Community: Zsolt László</title>
      <link>https://dev.to/zsolt_lszl_9d00af94fd2a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zsolt_lszl_9d00af94fd2a"/>
    <language>en</language>
    <item>
      <title>Embed Google reviews</title>
      <dc:creator>Zsolt László</dc:creator>
      <pubDate>Mon, 15 Sep 2025 16:50:24 +0000</pubDate>
      <link>https://dev.to/zsolt_lszl_9d00af94fd2a/embed-google-reviews-57e8</link>
      <guid>https://dev.to/zsolt_lszl_9d00af94fd2a/embed-google-reviews-57e8</guid>
      <description>&lt;p&gt;Hi everyone,&lt;br&gt;
I’m trying to display all Google Business reviews on my website, including reviewer name, star rating, and comment.&lt;/p&gt;

&lt;p&gt;Here’s what I have so far:&lt;br&gt;
I have a Google Cloud project and enabled the Google Business Profile API.&lt;br&gt;
I have the Account ID and Location ID for the business.( I could not get it form API, I am just guessing those are the IDs)&lt;br&gt;
I also have a token (access token / refresh token).( token.json with refresh token and access token too, but as I mentioned I am not sure)&lt;/p&gt;

&lt;p&gt;The problem is:&lt;br&gt;
I’m not sure if the token I have is valid or not.&lt;br&gt;
I don’t know if my OAuth2 setup is correct.&lt;br&gt;
I want to fetch all reviews with PHP and then embed them into HTML on my website.&lt;br&gt;
I’ve tried reading token.json / google_tokens.json and using the access token in PHP, but I always get errors or empty results.&lt;/p&gt;

&lt;p&gt;In summary I know I need oauth2, accountID, locationID, access token, redirect url, clientID, client secret.&lt;/p&gt;

&lt;p&gt;Questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;How can I verify that my access token and refresh token are valid?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How can I get and use the Account ID, Location ID, and tokens to fetch all reviews reliably?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is there a recommended way to automatically refresh tokens in PHP so I don’t have to generate new ones every hour?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ultimately, how can I output all reviews in HTML with reviewer name, stars, and comment?&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Any help, code examples, or guidance on the correct flow would be greatly appreciated!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>php</category>
      <category>api</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
