问题标签 [google-email-audit-api]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
867 浏览

java - com.google.gdata.util.AuthenticationException:身份验证错误(检查服务名称)

我尝试为我的 G 套件使用电子邮件审核 api。我与我的域的管理员联系。这是我的代码:

我在控制台中收到此错误:

com.google.gdata.util.AuthenticationException:在 com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory) 的 com.google.gdata.client.GoogleAuthTokenFactory.getAuthException(GoogleAuthTokenFactory.java:688) 验证错误(检查服务名称) .java:560) 在 com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(GoogleAuthTokenFactory.java:397) 在 com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:364) 在 com.google.gdata。 client.GoogleService.setUserCredentials(GoogleService.java:319) 在 com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:303) 在 com.google.gdata.client.appsforyourdomain.audit.AuditService.(AuditService.java :77) 在 com.archivage.gmail.HttpURLConnectionExample.sendPost(HttpURLConnectionExample.java:91) 在 com.archivage.gmail.GmailApplication.main(GmailApplication.java:28) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 在 sun .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49 )在 org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) 调用(Method.java:498)在 org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) 调用(Method.java:498)

0 投票
1 回答
622 浏览

google-api - 令牌无效 - 无效令牌:不支持的令牌类型 5

我正在使用 G Suite 电子邮件审核 API。设置 OAuth 2.0 令牌以访问 API 后;使用此 POST 请求时出现错误:

这是我的要求

以及内容类型:application/atom+xml

0 投票
0 回答
821 浏览

google-admin-sdk - G Suite 计数发送的邮件

我使用 Gmail G Suite 作为 smtp 中继发送电子邮件,所以在我的网络应用程序 web.config 中我使用 smtp-relay.gmail.com;我想计算使用这种方法发送了多少邮件。
我尝试了 Report API GMail,但数据没有实时更新,而且他们也没有跟踪通过 smtp 中继发送的电子邮件。
我已经看到,如果我进入 G Suite 管理控制台,然后报告并单击电子邮件日志搜索,我可以看到,如果我将研究限制在今天,通过 smtp 中继方法发送的邮件数量;我试图查看是否有与此相关的 API,也许这是 G Suite 电子邮件审核 API,但我不明白我是否可以使用它来简单地计算发送(和/或接收)的邮件,当我这样做时休息请求。
使用 API 可以创建一个电子邮件监视器,但我不知道(或不知道这是否是遵循的方法)是否足以检索一个简单的计数。