【发布时间】:2020-04-23 16:55:50
【问题描述】:
我已经阅读了 Google Drive API 文档。但是我无法理解如何在 React Native 中实现文档上传器。
我已经获得了API key,但是有一个叫做YOUR_ACCESS_TOKEN 的东西在所有这些之间我被卡住了。
我可以提供一些参考,包括驱动 API 调用或 api_key 和 ACCESS_TOKEN 的代码/场景
curl --request POST \
'https://www.googleapis.com/drive/v3/files?enforceSingleParent=true&ignoreDefaultVisibility=true&keepRevisionForever=true&supportsAllDrives=true&supportsTeamDrives=true&useContentAsIndexableText=true&key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{}' \
--compressed
我收到了来自 Drive https://developers.google.com/drive/api/v3/reference/files/create 的 Try It 的 Curl 请求 提前致谢。
【问题讨论】:
标签: javascript react-native google-drive-api