UrlFetchApp.fetch with Certificates

415 views
Skip to first unread message

Václav Petrák

unread,
May 6, 2022, 1:31:37 AM5/6/22
to google-apps-sc...@googlegroups.com
Hello, I need to call WS.
In Postman I need to have a *.pfx certificate uploaded to be able to make a query.

Is it possible to call from Apps Script to such a secured WS?

Thanks 

Bez virů. www.avast.com

Clark Lind

unread,
May 9, 2022, 7:01:52 AM5/9/22
to Google Apps Script Community
You may have to elaborate further before anyone can help. Like, what is "WS"? WorkSpace? 
Where does Postman come into play?
Etc. 

Without knowing your situation, I will make some assumptions. 
-if your app is running on Google's servers, you are very restricted in what you can do
-if you can get it running locally, like in VSCode, you can try pushing it to Apps script using CLASP. 
 -- it may not work still, because Google will remove any content it doesn't like
-if your app is Node-based or running in the browser, then you should be able to do what you want because the code is running in the browser, not on Google's servers
  --if you create an Apps script web app, it should work too since that will run in the browser and not on the server
  --with a web app, you can use JS and not worry about apps script restrictions

This video shows much of what I am referring to, very good for showing local Dev, CLASP, and even using React in Apps script:
https://youtu.be/aq2B02DuCs0

Reply all
Reply to author
Forward
0 new messages