Interaction with Google appengine from C #

I am writing a Google app app app that stores data and has a web interface. I want ableto dump this data in a C # program. This means that I need to authenticate from the site (users must log in to view the data). How can I authenticate as follows? I tried to set credentials in WebClient, but I keep getting google login page.

WebClient client = new WebClient(); client.Credentials = new NetworkCredential("username", "password"); //should it be username@gmail.com ?? client.BaseAddress = "http://nosoperor-internal.appspot.com"; String s = client.DownloadString("/bank"); //s now contains the google login page, unfortunately 
+4
source share
2 answers
+3
source

AFAIK, you probably need to use the Google Data Protocols and account APIs for authentication.

Edit: I would download the .Net client library and try the examples there. This will copy the copy from the docs :

 Service service = new Service("cl", "exampleCo-exampleApp-1")); // Set your credentials: service.setUserCredentials(" jo@gmail.com ", "mypassword"); 
+2
source

Source: https://habr.com/ru/post/1301975/


All Articles