2019-04-09
1、进入API控制台
https://code.google.com/apis/console/
登录账户,创建新授权项目
2、对新项目添加服务账户
创建服务帐号-分配角色
3、凭据添加凭据及设置
添加凭据-选择服务帐号密钥类型-配置OAuth同意屏幕-选择上一步配置的服务账户-选择json类型文件-点击创建-授权adsense-下载json
授权重定向URL:https://developers.google.com/oauthplayground
进入https://developers.google.com/oauthplayground/,填写刚刚创建的凭据信息,选择adsence management API,选择权限,点击Aothorize APIs按钮
点击按钮,获取refreshtoken