flutter - gsheets颤动如何添加凭据
问题描述
我正在尝试集成颤振gsheets(用于使用 Google Sheets API v4 的库。)它说要添加
const _credentials = r'''
{
"type": "service_account",
"project_id": "",
"private_key_id": "",
"private_key": "",
"client_email": "",
"client_id": "",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": ""
}
''';
// your spreadsheet id
const _spreadsheetId = '';
在这里我不确定如何使用它。我已按照 gsheets 库文档中有关入门和步骤的说明启用了所有 API。不幸的是,我只是不确定从哪里获得详细信息。
在互联网上找不到太多参考。请帮忙
解决方案
You can create a service account from Google, which will give you a json file with the credentials you're looking for. Google has posted some instructions here: [https://support.google.com/a/answer/7378726?hl=en][1] [1]: https://support.google.com/a/answer/7378726?hl=en.
Make sure you're careful with these credentials and keep them private; they contain some information about your service account that you wouldn't want to share with the public.
推荐阅读
- postgresql - 将大文本数据插入 postgres
- html - 防止从 jinja2 继承 CSS 包括
- c# - 无法在 ASP.NET MVC 中使用实体框架连接到订购 Oracle 数据库
- python - 在 Win 7 Pro 上升级到最新的 Python
- bash - 引用/保护通过管道传输到 bash 的特殊字符?
- r - 从R中的字符串中提取分布函数的参数
- android - RecyclerView EmptyView 有 RecyclerItem
- python - 如何动态将 Pillow 图像导入 Tkinter
- python-3.x - 压缩 Python 多个 re.sub() 函数
- omnet++ - 在 SUMO 中控制车道变更决策