Google API for Google Services - google-api

Normally I can find just about anything using a serach engine. But this time I seemed to have failed
I wanted to know if it is possible to get a list of services that are enabled and disabled such as GMail, Google+, YouTube, ect. I know I can do this through the Services tab on the Organizations and Users page. However I want to create an application that will allow me to enable and disable services from the app and not have to login to a webpage.
I have been poking around in the google apis and the only one that I found that is almost there is the discovery api but it does not list the core google services and there isn't a way to enable or disable the services.
Basically I just want to know, is there a way to do this and maybe where to look.

Related

Saving organization-wide application settings in Teams app

I have a Teams application (Tab). I am an ISV provider, and provide a multi-tenant application that is installed by customers via Teams App Store in their organizations.
How do I save settings for my application organization-wide for the customers? For example, CustomerA has installed the app and then CustomerB. I want some storage that would be unique for CustomerA and CustomerB and the app, and located in customer's environment. The settings I want to save are not per-user, but per-organization (tenant).
Somewhat similar to "App Data" folder you have in Windows Desktop for example.
Does such a storage exist? Does API for this storage exist?
A tab app is a simply a web application that you render inside of Teams. As a result, what the app does, and where and how it does it, is totally up to you. This includes any data storage you choose to have behind the scenes. For example, your tab could be built in PHP and use MySQL, or built in ASP.Net and use SQL Azure or CosmosDB. It's totally up to you, but you need to implement it yourself, as an ISV.
The important piece to differentiate clients, however, is being aware of the TenantId for each user, so you can look up which client's settings you need from the database. The most simple way to do this is simply the tid property on the Teams tab context. You can read more about that here. Unfortunately, because it's just accessed via Javascript, it's not entirely secure - for a more secure mechanism, you should be creating an Azure Application, and generating jwt tokens that you can authenticate against in your backend. It's a much more complex topic, but hopefully this answer at least gives the background you need. For more info on the security aspects (validating the token etc.), please see this question: How to restrict access to Azure Function to only allow requests from a custom Microsoft Teams App?.

The Option to select 'Other' for a client ID in the OAuth in the Google APIs is not available

I am attempting to utilize the YouTube API in order to pull a list of my subscribers from the site. I had to get Credentials and create an API client. In researching this step, I was advised to choose 'Other' as the client ID option, but currently there is no option for other. You can see the options in this picture:
This question provides some context for mine:
Where to download your_client_secret_File.json file
Google keeps changing the naming of it If your interested this is the progression of their naming.
other
native
desk top app
either way pick desktop app for an app that will be running standalone on a machine some where and not running via a website or mobile device.

Microsoft team - How to maintain user data

I am integrating my SAAS application to Microsoft Teams. Right now integrated as Tab in teams. I am using my own API endpoint to authenticate and authorize the user. I have got some specific information about the user I am getting from API. How can I store it in Team context? Right now I used local storage in the web app. In Teams web app it seems working but I don't think it is working in Desktop app. Is there some API available in teams which helps to maintain the user state with Tabs? similar to userstate in Bots? Please help.
I would think local storage would be troublesome across devices anyway, perhaps consider server-side storage instead.

Does Google Container Engine SDK/API exist?

I am planning to launch container cluster from an SDK/API. Presently, I am fine with any language, but I prefer NodeJS SDK. As far as I have seen, I could not find any Container engine SDK. Here is the NodeJS SDK for GCP which does not contain container engine. In fact it contains SDK only for very few GCP services.
I came across OAuth API for container engine but it involves human intervention to launch it. I am looking for service account based authentication for the SDK.
Are there container engine SDKs available ?
Update after discussion with Robert Lacok:
This is the code I tried to use for container APIs with API-key, it does not work. It expects Oauth 2 token, or some other credentials other than Service account. I tried API-key it didnt work. I dont know how to use Service account authentication with the API.
Here is my source code:
Here is the error:
I see a method for Application Default credentials. But I dont think so it will be useful for my use-case. I am trying to create container cluster from AWS Lambda. So, I cant use application default credentials. Is there any other options ?
The API for Google Container Engine is very limited at the moment as all the features are in Alpha status and because they can change not many people are incorporating them into the SDKs they are developing.
These are the current available APIs: https://cloud.google.com/sdk/gcloud/reference/container/
And here is the Alpha APIs: https://cloud.google.com/sdk/gcloud/reference/alpha/container/
What you probably want to do is making calls to the REST API and using the client library for OAuth2 authentication.
You can browse the API documentation and see that every method has a short how-to for a number of languages, NODE.JS being one of them. Have a look here for an example on how to create a container cluster.
You also mentioned service account authentication. The preferred way to do this is to use the application default credentials, you can have a little read about them here.
In short, you want to set an environment variable GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json which is a key to service account you generated in console.
Then the client library will take care of the rest (getting the OAuth tokens and what not).

purpose of enabling APIs for google apps

what is the purpose of enabling API in the Google developer console? Is it just for monitoring / fees / etc? If an app is using OAuth 2.0, you can tell from the token the identity of the app so you can just monitor that way. What is the purpose of this additional step?
Thank you for your help.
As you've already mentioned, it is for monitoring traffic, enforcing quota, and handling billing. An application does not necessarily have to use an OAuth 2.0 token to access Google APIs though. There are cases where when accessing APIs that do not require user data, API keys can be used instead. It also would not make sense to simply have all APIs enabled, as it is more reasonable to only activate the ones you need.

Resources