Has the Google Sheets Published URL Suddenly Changed to a Different Format?
<p>Normally, when I use the Google Sheets API, I get a very predictable URL structure from the "Publish Sheet" menu option, that I use to extract the Spreadsheet ID with a regular expression and use it for other tasks on the Google Sheets API. </p>

<p>This has worked for years and is the way that Google's documentation recommends getting the Spreadsheet ID - from the URL.</p>

<p>e.g.</p>

<pre><code>https://docs.google.com/spreadsheets/d/{MYSPREADSHEETID}/pubhtml
</code></pre>

<p>However, as of today, when publishing a spreadsheet, I now get a URL like this:</p>

<pre><code>https://docs.google.com/spreadsheets/d/e/2PACX{BUNCH OF RANDOM CHARACTERS}/pubhtml
</code></pre>

<p>This breaks my code as the bunch of random characters that appears with 2PAC is not the spreadsheet ID and does not work with the API.</p>

<p>Does anyone know if this is an unannounced change to Google's URL structure or some kind of bug?</p>