V
V
Viktor Familyevich2017-08-02 15:09:12
PHP
Viktor Familyevich, 2017-08-02 15:09:12

Why does the Get request in Google Apps Script via file_get_contents not work?

I pass in the get request the data that is inserted into the table, if you make a request through the browser, then everything is inserted, and if through php, then nothing comes out. Please tell me how to solve the problem so that the get request through php is normally processed?

file_get_contents('https://script.google.com/macros/s/AKfycby_fj_B1ewZd6QSGTariRzMtjUTtGkCT4LsTSbDZ1Gq/dev?param1=zzz')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ivanov, 2017-08-03
@Wintego

Victor Familyevich , in order to trigger such a request, your server must pass the authentication code of the owner or editor of the script project in the headers. This is necessary because the developer url is called for testing. Those. this address cannot be used for normal operation.
The easiest way to call a service correctly is to publish it. Links are very easily distinguished by their endings:
Details Web Apps / Deploying a script as a web app
GS Consulting

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question