Pregunta

Estoy tratando de construir una aplicación de servicio .NET que accedería a la API de predicción de Google.

Esta aplicación es un servicio (sin interacción de usuario), por lo que me gustaría saber cómo sería posible autenticar en Google API automáticamente (sin que abra un navegador en el que inicie sesión y luego presione "Autorizar") .

lo que he intentado:

¿Fue útil?

Solución

I've written a sample app (in Python & Java, sorry not available in C#) which authenticates once, stores the OAuth credentials and related data on the server (Google App Engine) and from that point forward reuses those shared credentials, refreshing the access token when needed, without requiring end users to see the OAuth allow/deny dialog, or any other aspect of OAuth.

This still requires the application administrator to execute the OAuth dialog but that's a one-time event. If for some reason you want to reset the stored server credentials, the initialization step can be re-executed on demand via a special URL, however, this reset function is protected so that only the application administrator can make that request, not an end user.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top