I am trying to get a pdf table file. Whenever I try, I get the following error:
Request error https://docs.google.com/a/firstcallres.com/spreadsheets/d/1ZPcW5cOQT5w28VUbr_JG9U-r7m6Uf-MDQcSmFOyhbE8/export?exportFormat=pdf&format=lf&lf=lf&lf=lf&lf=lf&lf=lf&lf=lf&lf=lf&lf=l=&lf=l=&l==&l========================== false & fzr = false & gid = 1680655368 returned the code 404.
If I click on the above URL when I log in, PDF is loaded.
If I use the following code, I will get the login page as an answer. URLis the URL of the sheet, and url_extare the parameters.
var response = UrlFetchApp.fetch(url + url_ext);
If I then use the following code with an OAuth token, I get a 404 response.
var response = UrlFetchApp.fetch(url + url_ext, {
headers: {'Authorization': 'Bearer ' + ScriptApp.getOAuthToken() }
});
Why is this happening? How can I use a token to access a sheet through script applications to extract a PDF?
Edit: he spontaneously started working on my test script applications. However, if I create the same function in other script applications, it will fail with a 404 error.
I made a few more troubleshooting problems and copied the working function directly into the new script application project. This function worked successfully, after which the idle function now works.
No changes were made to a non-working function that does not work and works.
Edit2: :. , 404. , , 404, - .