security - Is there a way to generate the authorization url for the importdata function to run? - Stack Overflow

I have a script set up to generate a spreadsheet we use when a new file is created in a particular fold

I have a script set up to generate a spreadsheet we use when a new file is created in a particular folder. It uses the importdata() function in google sheets.

Recently google sheets updated their permissions (I was wondering when this was going to happen) to disallow the importdata() function until it's authorized (the importdata function we use has URL parameters). The problem is that the initial use of the spreadsheet is frequently via the mobile app and the authorization button doesn't show for the mobile user to authorize the app.

To be clear:

  1. this button that is displayed on the desktop only and my issue is that the first use is often via mobile.
  2. It is authorizing the Spreadsheet to send/receive data and NOT the underlying apps script. Even if the underlying apps script has the ability to send/receive, the spreadsheet will not allow the importdata() function to work (particularly if it has URL parameters)

The URL that this authorization button posts to is: /{spreadsheetID}/externaldata/allowexternalurlaccess?token={token}&includes_info_params=true&usp=drive_fs&cros_files=false

I have tried generating this URL in apps script for the user to click on but it needs to be a post and not a get request. A get request to the URL returns a 404 error.

This issue should be easily duplicated by opening a new google sheet and adding the importdata() function to a cell with a URL with URL parameters.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745557784a4632924.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信