Google Calendar - getDefaultCalendar - no Authorization - google-apps-script

CalendarApp.getDefaultCalendar() authorization
I have a similiar problem like the one below. As described in the answer, I started the jobs from script editor and granted the permissions. But I still get the error in my stackdriver error list and the action is not completed.
What can I do to authorize the script again or to get it running?

Related

Opening Google App Script - Forbidden 403 Error does not let me open

i am the owner of the script and i am attempting to open script but I receive forbidden error 403.
please advise.
I have just encountered the same problem, trying to open the Script tabs on several Google Sheets.
Update: I logged out of the Google account, and then logged back in. This seems to have fixed the problem

I own the script but it says "You do not have permission to access the requested document." - Apps Script

I have a script that user will log their time and will be saved to our spreadsheet. All of a sudden, users can't access the deployed script anymore. Even me.
Error says:
You do not have permission to access the requested document.
Even if using /dev URL, I can't access. I also tried republishing a new version and deployed accessing to anyone even anonymous, but it didnt worked.
Any help will be appreciated.
Got the problem solved.
I lost access to my google sheet that's why. How silly I am.

How can I view logs for previous deployed versions of my Google Cloud Function?

I have a bunch of logs in the Stackdriver Logging console for a Google Cloud Function called 'Daily_ETL_Job'. I edit the code and redeploy this function, keeping the same name. Once the redeployment succeeds, I can no longer view the previous versions' logs in the Logging console. I just see a blank screen with no logs at all.
Is there some other way to view these prior deployment invocation logs?

How to generate API running when Stackdriver alert me?

I am following this doc.
I know Cloud functions make an HTTP request to your function, run the following command.
https://cloud.google.com/functions/docs/
I'd like to run a API that created in advance when the Stackdriver alerts may be triggered. I have already defined simple custom log-based metrics in GCP.
For example, I create a Stackdriver Alert detecting an unexpected error GAE log.
I want system to be down if that alert me.
It is possible to autmatic control APIs using StackDriver Alerting and Cloud funtions?  if you were me?

Unable to use fetchURL() in Google apps scripts

I am trying to call the below URL from Google apps script. In my browser it works fine, but when run from Apps script I get the error 'Access denied'.
var response=UrlFetchApp.fetch(url);//Fails with Access denied exception
URL :
Gets stock data in JSON format
'Request failed for http://www.nseindia.com/live_market/dynaContent/live_watch/get_quote/ajaxGetQuoteJSON.jsp?symbol=AXISBANK&series=EQ returned code 403. Truncated server response: Access Denied Access Denied You don't have permission to access "http://www.ns... (use muteHttpExceptions option to examine full response)'
Do i need to do anything extra?
Status 403 indicates that everything went as planned, but the recipient denied the request. Without clarification from the host site, it's hard to say why it's rejecting the request, but it could be anything from the request being denied due to an issue with your code, or they may have a service in place that prevents these kinds of requests from unauthorized IPs.
They may even have blacklisted Google apps script specifically, due to the nature of the site you're connecting too, and the potential for abuse.