Generating YouTube Data API v3 keys via CLI - youtube-api

I'm generating YouTube Data API v3 keys via Google Console and wondering if there is a way in generating it via CLI?

The google apis console is used to register your application with google. You can create api key as well as oauth credentials there.
This must be done manually there is no api for doing this nor is their a CLI which will allow you to access the google apis console.

Related

Where are my credentials for google-cloud-speech

I have been using google-cloud speech-to-text using api keys. Now I want to switch to using Google credentials (stored in a JSON file). But I can't figure out how to get those credentials from the google cloud portal. Heck, I can't even figure out where I got the api keys in the first place.
Anybody knows how to get those?
Thx.
To get the JSON file you need to have a service account. If you do not have a service account you can follow Creating a GCP service account.
Once you have a service account you can generate the JSON file by following Create service account keys. You can now use this JSON file to authenticate your requests for google-cloud-speech.

How can I restrict unauthorized access of Google Directions Api Http request on ios?

I have integrated Google Directions Api in one of my IOS application.
I am making Http request to this Api for drawing route between two point on map:
https://maps.googleapis.com/maps/api/directions/..........
My main concern is to secure my Api request, so that only my specific IOS application can access it?
I have tried applying bundle id restriction on Google api using Google Cloud Platform, If I am not wrong, as Google Directions Api is a webservice and Google is unable to identify that bundle and Google only identifies requests from IOS SDK Libraries.
Is there any way to restrict Google Directions Api?

How to sync Google calendar without client IDs and secrets?

I need to sync Google calendar with my Asp.NET MVC 5 application. I have a calendar in my application which is similar to Google's calendar, when I checked the Google documentation where they describes a sample console application. In that application, we need to download a client secret file and which can be used with the application for fetching the data from Google calendar. I can do this in a test environment, but in a production environment its difficult because the client need to download the file himself. How is it possible to get the details of the calendar without any file downloads but with a google login.
I think the clients will be reluctant to download a file and do the processing, how can I forward with syncing the calendar with out any client IDs and secrets.
I know OAuth is there to setup an authentication, but is that possible to forward with out downloading a client secret file ?
You can access the data from outh2 with out client permission and use your client-id and client secrete(Client for the API ) then fetch the client user details using the interface.use a library managing the authentication flow.
Refer Google API Client Libraries.
You have tried the sample console application right, try to use your credentials and to fetch client details.
Hopes it helps you.

Integrating YouTube APis in asp.net mvc app

How to configure my web app (Asp.NET MVC)!?
I use identity with Google login, but I don't understand how to configure my app.
Because in the documentation have 2 samples, but I don't understand how is good config my Apis!?
You will have to register your application in Google Developer console.
Next, after authentication succeeded, you will have to send a request to YouTube Api with the obtained tokens a client ID and secret
You can try out these from the Google Api playground best before coding.
Link: https://developers.google.com/oauthplayground/

Trying to Authorize Access to Google BigQuery via API Key

i try to access to BigQuery via the REST API from my webserver by this request for example:
https://www.googleapis.com/bigquery/v2/projects/project%3Aid/queries?fields=rows&key={YOUR_API_KEY}
As {YOUR_API_KEY} I use the API key for server apps from the Google API Console but I get a "401 Unauthorized"
What's the right way to do this request from a server without user interaction for authentication?
Google BigQuery does not support access via API key authorization. Instead, you should be using the OAuth flow that matches what you are trying to do with your application. See the BigQuery Authorization documentation here.
Without knowing anything about your implementation language I can only point you towards the google documentation: https://developers.google.com/bigquery/ which is fairly comprehensive.
Should you be using c# then you can check here on SO Google OAuth2 Service Account Access Token Request gives 'Invalid Request' Response

Resources