我正在尝试开发 Gmail 上下文小工具并尝试获取当前登录用户的电子邮件地址。
我根据此链接尝试了以下代码:https ://developers.google.com/google-apps/marketplace/best_practices#gadget_sso
function init() {
osapi.http.get({
'href' : 'http://yourserver.com',
'format' : 'json',
'authz' : 'signed'
}).execute(handleLoadResponse);
}
我在 Chrome Devtools 控制台上不断收到错误“ Unknown RPC service: osapi._handleGadgetRpcMethod ”,并且在我的服务器上没有收到任何请求。
有人可以在这里帮忙吗?它看起来像一个 Osapi 库问题。非常感谢任何帮助。