无需授权令牌即可访问Google电子表格API [英] Access Google spreadsheet API without auth token

本文介绍了无需授权令牌即可访问Google电子表格API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了Google Spreadsheet,并为所有人提供了编辑权限(即使没有登录也可以编辑)。

这里是

解决方案

您需要授权发出这样的请求


您的应用程序发送给Google Sheets API的每个请求都需要
将您的应用程序标识给Google 。有两种方法可以识别
您的应用程序:使用OAuth 2.0令牌(也授权
请求)和/或使用应用程序的API密钥。以下是如何使用
确定使用哪些选项:



如果请求需要授权(例如请求
个人的私人数据) ,那么应用程序必须为请求提供一个OAuth
2.0令牌。应用程序也可能提供API密钥,但它不必。如果请求不需要
授权(例如对公共数据的请求),那么
应用程序必须提供API密钥或OAuth 2.0令牌或
both-whatever选项是最方便的。


就是这样。没有绕过授权。


I have created Google Spreadsheet, and given edit access to all (can edit even without login).

Here is the link. I would like to update this sheet with Google Spreadsheet API. But I am getting error. My requirement is update the sheet thru API even without access credential.

解决方案

You need to be authorized to make such requests

Every request your application sends to the Google Sheets API needs to identify your application to Google. There are two ways to identify your application: using an OAuth 2.0 token (which also authorizes the request) and/or using the application's API key. Here's how to determine which of those options to use:

If the request requires authorization (such as a request for an individual's private data), then the application must provide an OAuth 2.0 token with the request. The application may also provide the API key, but it doesn't have to. If the request doesn't require authorization (such as a request for public data), then the application must provide either the API key or an OAuth 2.0 token, or both—whatever option is most convenient for you.

That's it. There's no bypassing authorization.

这篇关于无需授权令牌即可访问Google电子表格API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆