google-api-dotnet-client

Google Analytics API error 403: “User does not have permission to access profile”

戏子无情 提交于 2019-12-02 03:52:57
问题 I've been trying to learn how to use the Google Analytics API to get site traffic data. I keep running into an error saying that the user does not have permission to access the profile. I added the email address from the service account to the users and tried making it both a user with access to all profiles and an administrator and neither worked. This is my code, which I got from here: string scope = AnalyticsService.Scopes.AnalyticsReadonly.GetStringValue(); string clientId = "xxxxxxxx

Google Analytics API error 403: “User does not have permission to access profile”

六眼飞鱼酱① 提交于 2019-12-02 01:36:38
I've been trying to learn how to use the Google Analytics API to get site traffic data. I keep running into an error saying that the user does not have permission to access the profile. I added the email address from the service account to the users and tried making it both a user with access to all profiles and an administrator and neither worked. This is my code, which I got from here : string scope = AnalyticsService.Scopes.AnalyticsReadonly.GetStringValue(); string clientId = "xxxxxxxx@developer.gserviceaccount.com"; string keyFile = @"C:\Users\emorris\Downloads\xxxxxxxxxx-privatekey.p12";

NativeApplicationClient is not supported any

∥☆過路亽.° 提交于 2019-12-01 21:26:53
问题 When using this code In my Visual Stuidio Win form project. var provider = new NativeApplicationClient(GoogleAuthenticationServer.Description, ClientId, ClientSecret); I am getting a message NativeApplicationClient is not supported any more and it's going to be removed in 1.7.0-beta. Consider using the new Google.Apis.Auth NuGet package which supports .NET 4, .NET for Windows Store apps, Windows Phone 7.5 and 8 and Portable Class Libraries as well I am using install-package Google.Apis

Oauth2 login to Google api with ASP .net core MVC

喜夏-厌秋 提交于 2019-12-01 08:34:21
I have been following Web applications (ASP.NET MVC) Attempting to connect to one of the Google APIs. using System; using System.Web.Mvc; using Google.Apis.Auth.OAuth2; using Google.Apis.Auth.OAuth2.Flows; using Google.Apis.Auth.OAuth2.Mvc; using Google.Apis.Drive.v2; using Google.Apis.Util.Store; namespace Google.Apis.Sample.MVC4 { public class AppFlowMetadata : FlowMetadata { private static readonly IAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow(new GoogleAuthorizationCodeFlow.Initializer { ClientSecrets = new ClientSecrets { ClientId = "PUT_CLIENT_ID_HERE", ClientSecret =

YouTube C# API V3, how do you resume an interrupted upload?

我怕爱的太早我们不能终老 提交于 2019-12-01 06:49:11
问题 I can't work out how to resume an interrupted upload in V3 of the C# YouTube API. My existing code uses V1 and works fine but I'm switching to V3. If I call UploadAsync() without changing anything, it starts from the beginning. Using Fiddler, I can see the protocol given here is not followed and the upload restarts. I've tried setting the position within the stream as per V1 but there is no ResumeAsync() method available. The Python example uses NextChunk but the SendNextChunk method is

Validate Google ID Token in a .Net backend server

雨燕双飞 提交于 2019-12-01 06:40:55
问题 So, I have a Java-script and a .NET backend. In the Javascript i fetch the Google ID token when the user log in and the I would like to pass this to the backend and: 1) Validate the token 2) Extract the email, username etc. This is explained in documentation for java: https://developers.google.com/identity/sign-in/web/backend-auth The main thing is: GoogleIdToken idToken = verifier.verify(idTokenString); And: String email = payload.getEmail(); So simple in Java! But what to do in .NET? I

GMail API Super Admin access other users accounts via API?

ぐ巨炮叔叔 提交于 2019-12-01 06:24:13
My institution is currently running Google Apps for Education since early 2009. I’m responsible for creating, deleting, modifying, etc. , student email accounts. I’ve converted all my existing C# applications from the GData to the new Admin SDK - life is good. Last week one of the departments sent out an email to roughly 800 students that contained an error. I was asked if it’s possible to create a quick application that is able to remove the email for the 800 students inbox. Using my “Super Admin” domain account I was able to create an application using the Gmail API to go into my inbox and

Deploying ASP.NET to Windows Azure cloud, application gives error when running on cloud

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 06:03:32
I am trying to deploy an ASP.NET application the Windows Azure cloud. I am using Google API for one of the calls in the application. When I do this, I get the following error: System.UnauthorizedAccessException: Access to the path 'Google.Apis.Auth' is denied.` ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the

GMail API Super Admin access other users accounts via API?

回眸只為那壹抹淺笑 提交于 2019-12-01 04:53:12
问题 My institution is currently running Google Apps for Education since early 2009. I’m responsible for creating, deleting, modifying, etc. , student email accounts. I’ve converted all my existing C# applications from the GData to the new Admin SDK - life is good. Last week one of the departments sent out an email to roughly 800 students that contained an error. I was asked if it’s possible to create a quick application that is able to remove the email for the 800 students inbox. Using my “Super

Receiving Insufficient Permission error from DirectoryService

依然范特西╮ 提交于 2019-12-01 04:34:35
I am trying to setup c# code to manage our Google domain. I am receiving this error whenever I call service.Users.List() or any other method from the DirectoryService api. Google.Apis.Requests.RequestError Insufficient Permission [403] Errors [ Message[Insufficient Permission] Location[ - ] Reason[insufficientPermissions] Domain[global] ] I followed all the instructions on the OAuth setup. The account I am using is a domain admin. The clients secret file I am using works fine when I use it with GAM.exe to do the same operations. This is leading me to believe that i am doing something wrong in