In the past i have created an application that created google calendar events. I am attempting to re-create that and everything is working great until i need to get the 'credentials.json' file. I cant remember how to get that file created, and nothing on the internet seems to be able to do it without using google cloud.
Wondering if there is a way to do this without using the google-cloud?
I am using C# and the 'Google.Apis.Calendar.v3' package.
Any help would be great, thanks.
Sadly, I don't think you can do it without the help of Google Cloud. (Same as what Infinite Coders mentioned in the comments)
Follow the .NET quickstart here for the complete list of steps you need to take to integrate google calendar to your script.
The quickstart above includes the credential creation which you can visit here directly.
To get a credentials.json file your application needs to be registered with google on google cloud console.
This is how google knows who is using their apis and authorization server. There is no way to automate creating the credentials.json it must be manually created.
Depending upon which type of application you are working with will define how it is created Installed app , web app or service account
Related
I have a problem with the FirebaseAuthentication.NET library and Firebase in itself basically I have this error message which is displayed each time my application wants to connect to Google. I'm using WPF .Net Core 3.
So I give the authorization on my localhost firebase interface but unfortunately it does not work ;-; especially the problem the library FirebaseAuthentication.Net is not used a lot so I don't know if I'm the only one having this problem!
It's good finally I found the solution basically, must put the entire link is "http://localhost/authorize/" and "http://127.0.0.1/authorize/" on the google cloud console!
I have a mobile App in Android that successfully authenticated with Google api returning id-token and also profile information. Now I need to integrate it with my login and registration which I use .net web api as backend. I found google explaind article but not with c# and nuget library and microsoft docs is little difficult to follow. It will be better if i can integrate it with Identity that visual studio provides when creating new project with user authentication generated.
thanks in advance
I resolved my confusion next day after little digging and trying>
Ok first there are two ways of authenticating with third party which i was mixing them and I got confused.
First one in which your application is web or mobile but with web view.
Second way (that I'am using) in which native android activity handle going to google api, so the resulted id-token I manually send it to my api and use this code in c# to verify, requires Google.Apis.Auth library from nuget
var Payload = await GoogleJsonWebSignature.ValidateAsync(idtoken);
See image of steps need to follow in the second way
For more info:
https://youtu.be/zZt8SFivjps
https://developers.google.com/identity/sign-in/android/start-integrating
https://developers.google.com/identity/sign-in/web/backend-auth
Is there a way to integrate Google Maps into a C# WinForms application without embedding a browser into the application?
Thanks
Somewhere in 2016, Google declared that you must use a key to use their Google Maps API, that leaves you with 2 options.
To open Google Maps from the internet directly by URL (using a browser) or
Get a key, and run it using javascript, but you'd still need a browser to execute the javascript.
As far as I know, there are no current option to use Google's API offline from your own application, even the offline version of Google Maps itself will only be available for 30 days, due to the daily change in infrastructure in the world.
So I am a newbie to APIs and I have seen google's chrome.windows api https://developer.chrome.com/extensions/windows and I want to usedit, however there is no installation guide or, anything to go on. How do you setup this API in a C# project in VisualStudio?
Update:
I want to programmatically get all the open tabs in Chrome across all the windows.
I have an in-house CMS system written in ASP.NET C#, and I need to implement a few pages that can allow the user to access and alter their Google Analytics management settings using the Google Analytics management API.
I have added the Google.Apis.Analytics.v3 library from NuGet, and I managed to make it work using OAuth2 authentication.
However, the library installs several dependencies, and some of them are upgrading some of my existing DLL files. This is not good, because I have a lot of functionality in this solution and some other solutions that are based on these old DLLs.
Would it be possible to move all the Google API implementation into an external web-service and just call this from my CMS? That way, I would not have to upgrade the CMS's old references. The only problem that I've run into with this is that I have no idea how to use OAuth2 to allow the CMS user to use his own Google account since all this is now done in the web-service, and the authentication page from google will not open in the user's browser.
I don't think a web service will work. The user needs to be prompted for authentication with the web browser. You cant really do that from a web service and return the proper authentication.
The Google .net client lib uses the newest DLLs you may want to look into upgrading yours.