如何获取gmail api的消费者密钥和消费者秘密? [英] How to get consumer key and and consumer secret for gmail api?
问题描述
我正在尝试使用 Gmail php xoath php 示例,但是它需要输入消费者密钥和消费者机密,我在 Gmail api 文档中找不到如何获取这些信息.有谁知道如何获得它们或知道任何相关文件吗?
I am trying to use Gmail php xoath php samples, however it requires to enter consumer key and consumer secret which I could not find how to obtain in Gmail api documentation. Does any one know how to obtain them or know of any related documentation?
推荐答案
Use anonymous
/anonymous
和 HMAC-SHA1
签名用于应用程序未在 Google 注册.对于在 Google 注册的应用程序,您应该使用应用程序域作为使用者密钥,而使用者密钥取决于签名方法(您的 RSA-SHA1
私钥和 注册过程中生成的密钥)HMAC-SHA1
).更多详情请参阅签署 OAuth 请求.
Use anonymous
/ anonymous
and HMAC-SHA1
signature for applications that are not registered with Google. For applications registered with Google, you should use the application domain as consumer key and the consumer secret depends on the signing method (your private key for RSA-SHA1
and the secret generated during the registration for HMAC-SHA1
). More details at Signing OAuth requests.
请注意,据我所知,仅由 Google Apps 管理员安装的应用程序支持已注册应用程序的 HMAC-SHA1.
Note that as far as I know, HMAC-SHA1 for registered applications is supported only for applications installed by the Google Apps admins.
这篇关于如何获取gmail api的消费者密钥和消费者秘密?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!