Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

197
Vistas
Exception: Request failed for https://www.facebook.com returned code 404. Truncated server response:

Hello guys am stuck with a problem while creating a facebook ads task, am getting an error while i run my code , and the my error is Exception: Request failed for https://www.facebook.com returned code 404. Truncated server response: , if you have any problem please free feel to ask any time.

Error look like

// MODIFY YOUR SETTINGS HERE //
// url of the google sheets where the report will be
const SPREADSHEET_URL = 'https://docs.google.com/spreadsheets/d/1h-9f2Au7pBLUTpkOaSEPHJoEN61PQxnlQjczyz6_icU/edit#gid=0'

// name of the sheet where the report will be
const TAB_NAME = 'Facebook'

// DO NOT MODIFY ANYTHING BELOW //

function getFacebookReport() {
  
  // Selects the chosen sheet and tab
  const ss = SpreadsheetApp.openByUrl(SPREADSHEET_URL);
  const sheet = ss.getSheetByName(TAB_NAME);
  
  // Clears the sheet
  sheet.clear();
  
  // Gets the Facebook report run ID
  const cache = CacheService.getScriptCache();
  const reportId = cache.get('campaign-report-id');

  // Fetches the report as a csv file
  const url = `https://www.facebook.com/ads/ads_insights/export_report?report_run_id=${reportId}&format=csv&access_token=${TOKEN}`;
  const fetchRequest = UrlFetchApp.fetch(url);
  const results = Utilities.parseCsv(fetchRequest);
  
  // Pastes the csv file in the sheet
  sheet.getRange(1,1, results.length, results[0].length).setValues(results);

}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda