我正在通过 pub/sub 将来自 gmail 的通知发送到网络服务器,
我已经阅读了他们提到的启用范围的文档
https://cloud.google.com/pubsub/configure
我通过代码指定以下范围
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/pubsub
即使在为特定用户调用 watch() 之后指定了这些范围之后,它也给了我
Google::Apis::ClientError: forbidden: Error sending test message to Cloud PubSub projects/project-id/topics/topic-name : User not authorized to perform this action.
那么我需要从谷歌控制台启用这些范围吗?如果是,那么你能告诉我们这样做的方向吗?