在没有用户登录的情况下使用 OAuth 2.0 授权请求

Authorizing requests with OAuth 2.0 without the user signing in

一位客户要求实施新的 Google Photos API 作为他们在网站上的照片供稿。

问题出现而库仅支持 OAuth 2.0 来授权库请求。这意味着每个访问者都需要在看到照片之前验证自己的身份。

Authorization Like other Google REST APIs, the Library API uses OAuth 2.0 to handle authentication and authorization. Your app can request access to the user's Google Photos library via the various authorization scopes provided by the API.

Note that the Library API does not support service accounts; to use this API, users must be signed in to a valid Google Account.

有谁知道我可以针对所有网络流量对库进行身份验证的方法吗?我想使用 Google 照片作为图像的 CMS,并在网站上有一个持续的提要。

由于 Google 照片 APIs 需要 OAuth 2.0 用户凭据,您将无法将此 API 用作您网站的 CMS。

每个 API 请求都需要一个 OAuth 令牌,并且此令牌只能由使用 Google 帐户进行身份验证的人获得。 OAuth 流程要求用户对其个人 Google 帐户进行身份验证并授予权限。

此外,此 API 要求您创建用于跟踪您的应用程序的 OAuth 客户端机密。