• SECCIONES
    • Audiovisión
    • Sound Studies
    • Cuadernos
    • RADIO
  • ARCHIVO
  • SOBRE NOSOTROS
  • CONTACTO
  • Home
  • General
  • Guides
  • Reviews
  • News

Proxy Google Docs List Fix

const docs = response.data.files.map((f) => ( id: f.id, name: f.name, createdTime: f.createdTime, modifiedTime: f.modifiedTime, owner: f.owners?.[0]?.displayName ?? "unknown" ));

fetch('http://localhost:3000/list-docs') .then(r => r.json()) .then(data => console.log(`You have $data.count docs`); data.docs.forEach(doc => console.log(`$doc.name (ID: $doc.id)`)); ) .catch(console.error); Because the proxy already handled authentication, no Google credentials ever touch the browser – a big win for security. 8️⃣ Security & Production Tips | Concern | Recommendation | |---------|----------------| | Secret storage | Never commit service-account.json , oauth-client.json , or oauth-token.json to Git. Use environment variables ( GOOGLE_APPLICATION_CREDENTIALS ) or a secret‑manager (AWS Secrets Manager, GCP Secret Manager). | | Rate limiting | Add a simple IP‑based limiter ( express-rate-limit ) to protect the endpoint from abuse. | | CORS | If you plan to call the proxy from another domain, enable CORS only for allowed origins ( app.use(cors(origin: 'https://my-app.example.com')) ). | | HTTPS | In production, terminate TLS at your load balancer or reverse proxy (NGINX, Cloudflare). Never expose the proxy over plain HTTP on the public internet. | | Scopes | Grant the least privileged scope ( drive.readonly ). If you need edit capabilities later, expand scopes deliberately. | | Pagination | The example uses pageSize: 1000 . For very large accounts, implement nextPageToken handling to stream results. | | Logging | Strip any personally‑identifiable information before writing logs to external services. | | Monitoring | Hook the /healthz endpoint into your monitoring stack (Prometheus, Datadog, etc.). | 9️⃣ Alternate implementations (quick cheats) | Language | Minimal snippet (only the list request) | |----------|------------------------------------------| | Python (Flask) | Show code```python\nfrom flask import Flask, jsonify\nfrom google.oauth2 import service_account\nfrom googleapiclient.discovery import build\n\napp = Flask( name )\n Proxy Google Docs List

// ------- Service‑account (no user interaction) ------- try const saKey = await readFile(saPath, "utf8"); const auth = new google.auth.GoogleAuth( credentials: JSON.parse(saKey), scopes: ["https://www.googleapis.com/auth/drive.readonly"] ); console.log("🔑 Using Service‑Account credentials"); return auth.getClient(); catch (e) console.warn("⚠️ Service‑account not found or invalid – falling back to OAuth2"); const docs = response

# 3️⃣ Start npm start First run (OAuth path only) You’ll see a URL printed to the console. Open it, grant the permissions, copy the parameter, paste it back into the terminal, and the token will be saved for subsequent runs. Example response "count": 3, "docs": [ "id": "1A2b3C4d5E6F7g8H9iJ0kLmNoP", "name": "Project Plan", "createdTime": "2024-08-12T14:32:11Z", "modifiedTime": "2024-11-04T09:21:57Z", "owner": "alice@example.com" , "id": "2B3c4D5e6F7g8H9iJ0kLmNoP1Q", "name": "Marketing Brief", "createdTime": "2024-09-01T10:05:03Z", "modifiedTime": "2024-10-30T16:40:12Z", "owner": "bob@example.com" , ... ] | | HTTPS | In production, terminate TLS

// ────────────────────────────────────────────────────────────── // 1️⃣ Helper: create an authenticated Google API client // ────────────────────────────────────────────────────────────── async function getAuthClient() path.join(__dirname, "oauth-client.json");

const app = express(); const PORT = process.env.PORT || 3000;

// Query only Google Docs (mimeType = application/vnd.google-apps.document) const response = await drive.files.list( q: "mimeType='application/vnd.google-apps.document' and trashed = false", fields: "files(id, name, createdTime, modifiedTime, owners/displayName)", pageSize: 1000 // adjust as needed (max 1000 per request) );

 Previous Article 6,500-year-old voices recorded in pottery (just a hoax)
Next Article   El impacto del ruido intenso en el sistema nervioso

Related Posts

  • Proxy Google Docs List

    EUFÒNIC. TERRES DE L’EBRE / 10ª EDICIÓN

    16/07/2021
  • Proxy Google Docs List

    10ª convocatoria de residencias artísticas

    03/05/2021
  • Proxy Google Docs List

    SOUND, ENERGIES AND ENVIRONMENTS

    07/05/2019

Leave a Reply

Lo siento, debes estar conectado para publicar un comentario.

mediateletipos.net Seguir

Sound art, audiovisual activism, and new media.

Avatar
Retuitear en Twitter mediateletipos.net Retuiteado
Avatar Robert Beatty @edsunspot ·
4 Sep 2024

Internet Archive forever, fuck copyright

Responder en Twitter 1831427228091183297 Retuitear en Twitter 1831427228091183297 221 Dar me gusta en Twitter 1831427228091183297 1432 Twitter 1831427228091183297
Retuitear en Twitter mediateletipos.net Retuiteado
Avatar Sergio Sánchez @jazznoize ·
24 Ago 2024

Deberíamos ir a grabar sus voces. Que suenen por megafonía. #talibanes #sonidos

Responder en Twitter 1827311211727192323 Retuitear en Twitter 1827311211727192323 2 Dar me gusta en Twitter 1827311211727192323 3 Twitter 1827311211727192323
Retuitear en Twitter mediateletipos.net Retuiteado
Avatar AGF ❤️‍ @poemproducer @poemproducer ·
28 May 2024

the entire human species should put all focus and resources to prevent ecocide, implement climate justice and force global disarmament, this is not naive talking, this is an urgent necessity ... we are one species, we decide how to become, alongside all life

Responder en Twitter 1795332083629568417 Retuitear en Twitter 1795332083629568417 1 Dar me gusta en Twitter 1795332083629568417 6 Twitter 1795332083629568417
Retuitear en Twitter mediateletipos.net Retuiteado
Avatar Los voluble @voluble ·
17 Mar 2024

Medio día de pregón,
Tarde de "searching for a good sample"

Id a muerte con Dios

Responder en Twitter 1769336726646911362 Retuitear en Twitter 1769336726646911362 2 Dar me gusta en Twitter 1769336726646911362 6 Twitter 1769336726646911362
Load More

Tags

acciones acústica arte arte sonoro artilugios artistas audiovisual charlas cine comunidades convocatorias copyleft cultura libre directos educación entrevistas eventos exposiciones festivales fonografía grabaciones de campo hacktivismo historia ideologías instalaciones instrumentos inteligencia colectiva internet libros música netaudio novedades nuevos medios paisaje sonoro podcasts radio recursos ruido software software libre sonido talleres textos videoarte vídeo

Comentarios

  • Okjatt Com Movie Punjabi
  • Letspostit 24 07 25 Shrooms Q Mobile Car Wash X...
  • Www Filmyhit Com Punjabi Movies
  • Video Bokep Ukhty Bocil Masih Sekolah Colmek Pakai Botol
  • Xprimehubblog Hot

ENLACES

  • Artesonoro.org
  • Aurales
  • Escoitar.org
  • Observatorio de la Escucha
  • Sensxperiment 2011
  • Ursonate Fanzine
  • Zemos98

© 2026 Pure Scope. All rights reserved.

© Copyleft 2023. Algunos derechos reservados. Web alojada en Pumpun. I/O
Utilizamos cookies para asegurar que damos la mejor experiencia a nuestros usuarios y para desayunar. Si sigues navegando, asumiremos que estás de acuerdo.Chachi