如何获取 Google Cloud Storage 的授权令牌 [英] How to get Authorization token for Google Cloud Storage

查看:18
本文介绍了如何获取 Google Cloud Storage 的授权令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试集成 Google 云存储 API 以将我所有的网络应用上传传输到谷歌云存储.

根据文档,每次发出新请求时我都需要传递 Authorization 标头,但没有得到我可以获得该授权令牌的位置?我非常努力地检查了很多 Git 存储库和 StackOverflow 讨论.

还是找不到答案.

更多

解决方案

您可以在 OAuth 中获取授权令牌2.0 游乐场.按照描述的步骤操作.请注意,在第 2 步中,您必须单击交换令牌授权码"才能获得所需的访问令牌".我建议您第一次遵循此上传对象指南(REST API)你试一下.

也许您可以使用 云存储来做到这一点客户端库.

I am trying to integrate Google cloud storage API for transferring all my web app uploads to google cloud storage.

According to documentation, I need to pass Authorization header every time making a new request but am not getting where I can get that Authorization token? I tried so hard I checked a lot of Git repos and StackOverflow discussions.

Still am not able to find answers.

For more informations

解决方案

You can get the Authorization token in OAuth 2.0 Playground. Follow the steps described. Notice that in step 2 you have to click on "Exchange authorization code for tokens" to obtain the "Access token" you need. I suggest you to follow this Uploading objects guide (REST APIs) the first time you try it.

Perhaps you can do this using the Cloud Storage Client Libraries.

这篇关于如何获取 Google Cloud Storage 的授权令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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