Google api GrantOfLeaceAccess不与作用域一起工作
我在我的angular 8网站上使用谷歌API。我必须在不同的按钮上集成Google Drive和YouTube帐户Google api GrantOfLeaceAccess不与作用域一起工作,google-api,youtube-api,google-api-js-client,google-api-javascript-client,Google Api,Youtube Api,Google Api Js Client,Google Api Javascript Client,我在我的angular 8网站上使用谷歌API。我必须在不同的按钮上集成Google Drive和YouTube帐户 YouTube连接按钮 谷歌驱动器连接按钮 我把gapi初始化为 initGoogleAccounts() { gapi.load('auth2', () => { this.googleUser = gapi.auth2.init({ client_id: this.env.google_client_id, fetch_basic_profile
initGoogleAccounts() {
gapi.load('auth2', () => {
this.googleUser = gapi.auth2.init({
client_id: this.env.google_client_id,
fetch_basic_profile: false,
scope: 'profile'
});
});
}
点击Youtube上的按钮
this.googleUser.grantOfflineAccess('https://www.googleapis.com/auth/youtube.force-ssl').then(({code}) => {
this.youtubeCodeConnect(code);
});
但这并不是要求Youtube许可。
有什么我做错了吗?您没有要求脱机作用域您没有要求脱机作用域