D. Gencheva
D. Gencheva

Reputation: 226

Verification with the new Google rest apis requirements (15.01.2019)

in the requirements for using the Gmail REST APIs: https://developers.google.com/terms/api-services-user-data-policy#additional-requirements-for-specific-api-scopes There is the statement:

Do not mislead Google about an application's operating environment. You must accurately represent the environment in which the authentication page appears. For example, don't claim to be an Android application in the user agent header if your application is running on iOS, or represent that your application's authentication page is rendered in a desktop browser if instead the authentication page is rendered in an embedded web view.

We have an Electron version of our app, that is only wrapping the web version URL in a desktop app. So we are using the OAuth flow for Web Server applications for both the web app and the desktop app. Can this be considered a valuation of the User Data Policy?

Upvotes: 2

Views: 166

Answers (1)

John Hanley
John Hanley

Reputation: 81454

The key is agent header. This corresponds with the HTTP header User-Agent.

What Google is asking is that you use a User-Agent string that matches the platform that you are running on (android, iOS, Windows 10, ...). This link will give you more information about User-Agent.

You can test what strings are included by your browser using this site. This should give you a better understanding. For example on my Windows 10 desktop using Chrome:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

This link is the RFC7231 standard.

If your software is running in the browser, you don't need to do anything except don't override the User-Agent value. If you are writing your own custom software, then do some research and specify a User-Agent string that identifies the platform and append your software / company name.

Electron publishes a list of its User-Agent strings. My initial recommendation is just leave the User-Agent header alone and let Electron manage this for you.

This StackOverflow answer shows how to set the Electron User-Agent header if you choose to do so.

Upvotes: 1

Related Questions