Toowired commited on
Commit
04a95b9
·
verified ·
1 Parent(s): fd79a69

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +2 -2
index.html CHANGED
@@ -392,7 +392,7 @@
392
  // Method 1: Header authentication with minimal request
393
  try {
394
  console.log('Attempting validation with X-Goog-Api-Key header...');
395
- const response = await fetch(`https://texttospeech.googleapis.com/v1/voices?languageCode=en-US&pageSize=1`, {
396
  method: 'GET',
397
  headers: {
398
  'X-Goog-Api-Key': cleanApiKey,
@@ -419,7 +419,7 @@
419
  if (!validationSuccess) {
420
  try {
421
  console.log('Attempting validation with URL parameter...');
422
- const testUrl = `https://texttospeech.googleapis.com/v1/voices?key=${encodeURIComponent(cleanApiKey)}&languageCode=en-US&pageSize=1`;
423
  const response = await fetch(testUrl, {
424
  method: 'GET',
425
  headers: {
 
392
  // Method 1: Header authentication with minimal request
393
  try {
394
  console.log('Attempting validation with X-Goog-Api-Key header...');
395
+ const response = await fetch(`https://texttospeech.googleapis.com/v1/voices?languageCode=en-US`, {
396
  method: 'GET',
397
  headers: {
398
  'X-Goog-Api-Key': cleanApiKey,
 
419
  if (!validationSuccess) {
420
  try {
421
  console.log('Attempting validation with URL parameter...');
422
+ const testUrl = `https://texttospeech.googleapis.com/v1/voices?key=${encodeURIComponent(cleanApiKey)}&languageCode=en-US`;
423
  const response = await fetch(testUrl, {
424
  method: 'GET',
425
  headers: {