Can't Enable firebasedynamiclinks api for project - google-apis-explorer

I am trying to get the api explorer for the function firebasedynamiclinks.getLinkStats
After logging in for Oauth and executing the request I get the following error message.
Firebase Dynamic Links API has not been used in project
before or it is disabled. Enable it by visiting
https://console.developers.google.com/apis/api/firebasedynamiclinks.googleapis.com/overview?project=%ProjectId%
then retry. If you enabled this API recently, wait a few minutes for
the action to propagate to our systems and retry.
Following the link with the provided %ProjectId% from the original error takes me to a page that gives me the following error:
The API "firebasedynamiclinks.googleapis.com" doesn't exist or you
don't have permission to access it
It seems strange that I have the ability to generate dynamic links and do so manually just fine. I don't know which project I need to enable the dynamic links api for as I have enabled it for the Google Scripts project that I am using it in.
How can I get access to manually created dynamic link analytics?

Related

What's the usage for openDynamicLinkAction with example

I'm working on the Gmail addon with alternative runtime using nodejs. There is an option openDynamicLinkAction and the documentation says
https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1
"An add-on triggers this action when the action needs to open a link. This differs from the openLink above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back."
And nowhere mentions how the response structure should be to execute open link as a popup using openDynamicLinkAction.
Please help me with the proper usage of this option.

Bot stopped responding, no errors logged

I had a bot working. It pulled data based on a keyword search from a spreadsheet. It suddenly stopped working - with no changes to the code - and is not logging any events in onMessage, onAddToSpace or onRemoveFromSpace.
Sending a DM to the bot responds with "Bot not responding". I have check the Cloud Console and it is published to my account with the correct ID. All fields in the console match settings in the bot headers. Nothing is logged to StackDriver.
I also had a webapp deployed with the bot, and it was working concurrently. I disabled the web app to no results.
The most confounding issue is that other bots deployed are still working. What am I missing?
UPDATE
I went through all of the API scopes I needed. I was pulling from DriveApp and the YouTube data API. Disabling the YouTube API has allowed the app to start working again.
UPDATE 2
Porting the code to a separate working bot allowed the YouTube API to begin working again. The other project was also serving a web app, but disabling the app didn't make any change. I think there is some kind of permissions conflict when a single script is serving multiple resources. Perhaps the chat bot uses a hidden URL that is in conflict with a hosted web app. I cannot find any documentation about how the chatbot is served from apps script other than the deployment ID. Is there another piece to the puzzle?

Google app script : how to enable fusion table for use with app script?

When tring a simple select query against my FusionTable, i got this error
Access Not Configured. The API (Fusion Tables API) is not enabled for your project. Please use the Google Developers Console to update your configuration.
My question is 'how' enable fusion tables api in developer console for use with a standalone app script?
My dubt is about the projetc, because I cannot select my app script project from google drive as the project for which to enalbe the API. And even creating a new project, I end having a json file as credential but how I use it?
NOTE: I already enabled FusionTables into my project's advanced resource configuration AND I've already enable into Google developer fusionTable api manager... but here I read
This API is enabled, but you can't use it in your project until you create credentials.
Click "Go to Credentials" to do this now (strongly recommended).
This is the core of the problem. Which credentials exactly must I create and how to use the newly generated credentials in my standalone Google App Script?
What the right answers to these questions?
You need to enable the API from the project's Developers Console link.
1) Open your script project.
2) Select Resources in the menu.
3) Select Developers Console Project...
4) Click the link that looks like projectname -api-project-5853434..
5) After you get redirected to the console, click the hamburger menu in the top left and choose API Manager
6) Type Fusion into search. And select the Fusion Tables Api.
7) Click the Enable button.
This will take care of your first error.
As for your second error:
When you create a new project it generates a new developers console project for your script along with a set of default credentials. You can only access it from the script editor IDE, as it will not show up in console.developers.google.com view all projects page. I suspect your error is a result of tinkering with the projects dev credentials or possibly an error on Google's side generating the dev console project.
I would migrate your script to a new Apps Script project. Enable the fusion table advances service and the API as I detailed above. This will clear up the second issue.

Accessing web app developement URL from UrlFetch service

I'm trying to develop a simple web app using google script web app service and access it from another script using the UrlFetch service.
My problem is that in order to try the code on my web app I have to publish a new version every time because trying to access to the dev URL returns returns and HTML file telling me to sign in even though I've set the permissions for the web app to everyone, including anonymous (if I hit the production URL it does work, though).
I'm assuming that Google is limiting the access to the dev URL for security reasons but can someone shed a light on that assumption?
PS: I don't know if this is relevant but my google account is in a Google Apps for Education domain
Edit
I've found a method to avoid publishing the application for each code change: instead of calling it from the UrlFetch service, I've created a function in the web App code that does call the doPost or the doGet method (I've to create the request param, but that's easy) and I've changed the end of the script to log the result insted of returing it to the client. When the application will be ready, I can publish and develop the client using the UrlFetch.
Anyhow, if anyone knows about the limitation of the dev URL that would be great!
your assumption is correct, the dev url ignores your publishing permissions on purpose, only the developer has access to that url.
you could accomplish what you want using libraries. move the code in your called script to a library and add it to that script as "development mode" and publish your script service.
changing library code should also change your service because its on development mode.
Note that this can easily break your app if you save partial code changes, and makes it hard to test your changed code unless you make all changes and tests in a separate script copy. Making several changes at once in multiple apps script editor files is possible with their "Save all" File menu command (after manually pasting all code changes from your tested copy).

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.