Sheets.googleapis
... / Sheets.googleapis
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Sheets.googleapis

by
f081ff5398078ced962a
Created on 2024-09-27 07:50:06 (edited on 2024-11-18 11:12:08) in Hébergement Web-old

Bonjour, à toutes et tous ,
Je souhaite souscrire à la première formule d'hébergement OVH, et je voudrais savoir si elle permet d'interagir avec Google Sheets via PHP.
Actuellement, j'utilise deux approches :

1- API Google Sheets avec clé API simple : Un script PHP utilisant file_get_contents() ou cURL pour récupérer des données via une clé API. Exemple de code :
$url = "https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{range}?key={apiKey}";
$response = file_get_contents($url);

Ou via cURL :
curl_setopt($ch, CURLOPT_URL, $url);
$response = curl_exec($ch);

2 - Authentification OAuth 2.0 : Pour les accès plus sécurisés, un script utilisant OAuth 2 pour interagir avec les Google Sheets.

Est-ce que la première formule d'hébergement permettrait l'exécution de ces scripts et la connexion à l'API Google Sheets sans restrictions particulières (comme allow_url_fopen, cURL, ou connexions sortantes) ?

Merci d'avance pour vos précisions.