How to publish google apps script to cloud for public? - authentication

I have a apps script that uses bigquery service to fetch data from my bigquery account and builds visualizations/tables etc. I publish the app with following options
Execute App as: User accessing web app
Who has access to this app: Anyone
When I open the link (one ending in exec not dev) in chrome incognito, I expect it to show the web app but it asks for google credentials.
When I entering credentials of my other (different from the one hosting the project) account, I get a permissions error.
I added this other account from my primary one under permissions option of google console - even that wasn't enough.
I had to create a dummy project as this other user to accept the invitation from my primary account. After that the app showed up on this other account.
My question is, how do I publish my app for the consumers (even public) of this info without them having to create dummy project/accept my invite etc?
Thanks

You have two errors:
1) Publish to run as you not the user, and2) make it anonymous access. *
People might consume your daily/per second quotas thou.
(*) anonymous access option might not be present if the google apps administrator disabled anonymous sharing in the console.

Related

Google script web app running as me - identify actual user

I have a Google Apps Script deployed as a web app. It is configured to run as me, as it creates and amends events on my calendar and uses a Google sheet of mine as its data store.
There is a requirement that users are NOT required to have a Google (or any other specific type of) account to log on, so I have written a bespoke login function.
The problem I have is reliably identifying the user session.
User properties/cache doesn't work as the user is me for all users.
Is there a way I can identify something unique about the actual user to identify their session?
I understand that web apps run on Google's server and that I have no access to the user's browser so cookies and similar technologies are not an option.

Accessing own Dropbox storage from an application

I would very much like to enable users of my app to backup some of app data on their own Dropbox. I would like to direct users to login to their Dropbox account with their email and password and then the app would generate and store a file there without users having do anything on their own.
Is this possible?
I wouldn't want users to have to go to Dropbox App Console and then Create App and then fill in all the options and then copy the access token and paste in my app manually. That would repel a lot them.
I haven't seen anything in the docs suggesting that programmatic access to an account without an app created in the Console and generated access token is possible? Did I miss something?
Yes, this is possible. You as the developer would register the app once, and implement the Dropbox OAuth app authorization flow in your app to allow your end-users to then connect your app to their accounts.
You may want to check out the following guides:
https://www.dropbox.com/developers/reference/getting-started
https://developers.dropbox.com/oauth-guide
https://developers.dropbox.com/dbx-file-access-guide

How to set up Google sheets API for personal use

I'm trying to follow the instructions here which tell me to create credentials via the instructions here, which as step 6 tells me 'Click the user type for your app. If you're running a Quickstart, select Internal.'
On the page in question, 'Internal' is greyed out, and tells me I can't select it because I'm not a Google Workspace user. Going to Google Workspace, it tells me I need a domain name for 'my business'. Since I don't have a business, or any domain that would have anything to do with this project (I just want to push some personal data from the command line to a sheet), I don't seem to be able to proceed. Is the Google Sheets API just not available for such use?
If you don't have a Workspace account but you don't want to publish your app publicly (and go through the associated review by Google), you can set the app to External and test the app instead of publishing it.
In order to do that, just add yourself as Test user when setting the OAuth consent screen, and leave the Publishing status on Testing, don't change it to In production:
Testing
Projects configured with a publishing status of Testing are limited to up to 100 test users listed in the OAuth consent screen. A test user consumes a project's test user quota once added to the project.
Google will display a warning message before allowing a specified test user to authorize scopes requested by your project's OAuth clients. The warning message confirms the user has test access to your project but should consider the risks associated with granting access to their data to an unverified app.
Authorizations by a test user will expire seven days from the time of consent. If your OAuth client requests an offline access type and receives a refresh token, that token will also expire.
Reference:
Publishing status: Testing
Unfortunately, that means that the authorization lasts only for 7 days. Which means that I have to keep creating new projects every 7 days, which is untenable. Here is the excerpt from the "Setting up your OAuth consent screen" page on the Google support site.
Authorizations by a test user will expire seven days from the time of consent. If your OAuth client requests an offline access type and receives a refresh token, that token will also expire.

Authenticating user without creating app manifest in teams app

Just because of authentication I need to create an app manifest and share the app manifest with users who want to test it .Is there a way to Authenticate user without creating app manifest so that I can directly share bot link with users.
Talking to your bot by ID is intended for basic testing purposes only. Any Teams-specific functionality you have added to your bot fails to work.
Doc ref: Talk to your bot directly by ID
In this example
Is is an OAUTH flow with Azure AD directory v2 without any app manifest.
This one is in java_springboot but you can find the same for your prefered langage in the samples directory. The number 18 (and all the others) in all samples is the example but in different langages.

Cannot add users to Google Console Project

I am attempting to add a project owner within Google Developer Console under Permissions. The original project was created with a domain user (Google Apps for Work) and I can add other domain users but cannot add external users (other gmail or different Google Apps domain user).
I receive a 504 error in the Console logs and a message saying "The server has timed out while trying to process your request."
Has anyone seen or resolved this issue? Or perhaps know of a way to contact Google support regarding this?
UPDATE:
I realized that the this happens for two of our projects and both projects have a prefix on the project ID: carrotcreates.com:xxxxxxxx
I am not sure if this is linked but carrotcreates.com is the primary domain for our Google Apps account.
Thanks!