Google Site: API access to mature content is blocked - google-apps-script

Service error: SitesApp: API access to mature content is blocked (line
21)
The above error message appears after I ran my Google app script. Is there any way to access Google sites with mature content enabled?

This appears to be an undocumented restriction of the Google Sites API. We should include this in our documentation, and I see you have already filed an issue to track this.

Related

Google Apps Script does not allow access in Google Workspace

I have published a Google Apps Script as a web app. Because the URL is not so nice, I have included the script in an iframe on a site with a nicer URL. I have included the corresponding option so that it works at all. Now this web app should only be accessible within the Google Workspace (formerly known as GSuite) I am working in. This setting can be done when publishing the Web App. The problem is, however, that some users (by far not all users!) in our Google Workspace cannot access the Google Apps Script that way. There is a error message saying that Google prohibits the connection.
It seems like the authenticiation does not work "through the iframe". Interestingly, the problem only arises when
the script is embedded in an iframe (the direct script URL by Google works for the users)
the script is restricted to the Google workspace.
Chrome is used (the issue does not happen with Firefox)
It is remarkable that for most users in our Google Workspace the issue does not appear. We had similar problems when including the script on a Google site (which, in the end, is also just an iframe), but with less users experiencing the issue. I have already made sure that the users are only logged in with their Google Workspace account (no other account which has no permission). In Inkognito mode the same happens.
Can someone explain this behaviour? And how to fix that (without changing the framework)?
I have been in contact with the Google support. If I remember correctly, this kind of authentication will be deprecated and should now be done with other tools, for example Google's Firebase Auth.

Follow official steps to Generate Google Map API for new project, fail to load into Google Cloud Platform

I am trying to add a map into my website marking the location of a place.
So I read that I have to generate API from Official google map API page.
I created a project, setup billing as required.
Then when loading into the Google Cloud Platform, it always throw me an error saying something went wrong:
How am I going to fix this?
There are a number of reasons why this error could have been thrown. Often times further evaluation of the error would be required by reviewing the Stackdriver logs as the rootcause cannot immediately be determined just being viewing the Console error message displayed.
For this type of issues, the recommendation is that you contact the Google Cloud Platform support team or you can create a Public issue on the general Cloud Platform Public Issue Tracker. There is relatively little that can be done on Stack Overflow to help you debug this.

Google Apps Script oAuth 2.0

I'm using Google Query and Google Apps Script to create information pages (draw tables, graphics etc) inside Google Drive.
Since yesterday all pages, that I've created, are falling down with this message:
Error in query: ACCESS_DENIED. This spreadsheet is not publicly viewable and requires an OAuth credential.
I understand that Google wants me to use oAuth 2.0 however I'm unsure how to do this since every page is enabled only for registered Google users and of course it requires basic Google authentication.
Does anyone have any ideas on how to include oAuth 2.0 into Script inside Google Drive, which is already using oAuth 2.0 (At least I guess it is)?
There are a number of ways of using OAuth 2.0 within Google Apps Script depending on what you're trying to achieve. See here and here, for examples.
Perhaps you could post your sample code, explaining what you're looking to do and where it is going wrong?
We had this problem couple of days ago. We created an add-on which helped us resolve the following problem. Please go through this link to
create an add-on
Then gapi js was able to communicate with our spreadsheet even when private. Hope it helps.

Simple API Access status: suddenly INACTIVE

I was developing android application that has backup to google drive feature.
I have used Simple API Access key and it worked like a charm for few weeks.
However, from yesterday, it does not work at all. (cannot list uploaded files and 403 fobidden error when trying to upload new file) I checked Google APIs Console and found out
Simple API Access
Status: Inactive
and Reports is not available and keeps showing popup message "An unexpected error has occurred. We're looking into it."
I googled about this message but there is no solution. (but found several issues related to google cloud SQL)
I was considering to use google drive on commercial level android app and this is very bad...
I wonder what is the problem and how to reactivate api status.
Thanks :)
Unfortunately, because of the security model of the Drive SDK, we need to be sure that an application is who they say they are, which simple access does not give enough assurance of. For a commercial application, this strength of security is great for users.
For a solution, you need to use Google Play Services as outlined in the documentation. We are currently working on a guide to get started with this very quickly on Android, and should be available within the next week.

I am facing "The authenticated user has not installed the app with client id" error even after installing the app [duplicate]

I'm working on a Google Drive interface for Emacs. The concept is that Emacs could provide a platform-agnostic way to load, modify and save text documents stored in Google Drive. I've registered my app and can authenticate with OAuth2 and get a file listing with the Docs List API, but when I try to execute an Insert with the Google Drive API, I see an error:
"The authenticated user has not installed the app with client id ..."
Reading further, it seems I need to publish my Emacs application in the Chrome Web Store to get access to the Drive API. That doesn't make sense to me...I noticed that there is a FUSE project in development for Google Drive, which suggests that native development is possible. When I skimmed the code, however, I didn't see a Chrome Web Store component to getting it working.
Am I trying to misuse the API, or is there an route to make this work that makes more sense?
EDIT:
According to Ali Afshar, of the Google Drive team, installation is no longer required to use this API. So what follows may no longer be relevant, but will be left for historical purposes.
So, first off the API does not support application development in the sense that we are both doing it, I wouldn't use the word native though. The good news is I have been doing some research and Google Drive is really just a rebranding of Google Docs. So the Google Docs API could be a good choice as well for the same purposes.
Anyway, here's the steps to solve the error: "The authenticated user has not installed the app with client id ..." Which is a 403 error, for the sake of this answer. These steps assume you have set up an app in the chrome web store as is required, and installed it. I am working on my local machine too, with my project: http://github.com/tom-dignan/gdrive-cli which I have gotten past this error, so I think you should keep plugging away at your emacs version, because I think we can make this work.
a. Open the Google APIs console.
b. Confirm you've already enabled the apis under "API Access" both the API and SDK for Google drive should be enabled. There you get your client secrets/api keys and such. I am almost positive you've done this already, so go ahead to C. (this is here for others who may have missed it)
c. In the left navigation bar, under "Drive SDK" you will need to do the following:
Add a "Support URL" (required)
Add at least a small 16x16 application icon (required)
Add "OAuth Client ID (Required)" under Drive Integration (I was just tinkering and this seems to be the key field.)
Add "Open URL (Required) URL to open for your app from the google drive UI."
Check off "Multiple File Support"
Add some MIME types and file extensions, "text/plain", and txt for example
Add the the auth scopes:
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
Don't bother trying to add the auth scopes for Google Docs here, because it won't work. Google does not want us to use it that way because files that drive apps create should be private to that app. Integration with Google Docs will have to be separate.
Now I know you must be thinking "why do I have to add some of these..." It's because the form makes them required fields. In mine, I put a couple URLs that point to static HTML pages.
Once you've done the above, clean up your state and reinstall your chrome app. Then try your code again, and it should stop giving you a 403.