{"action":"created","issue":{"url":"https://api.github.com/repos/EddyVerbruggen/cordova-plugin-googleplus/issues/241","repository_url":"https://api.github.com/repos/EddyVerbruggen/cordova-plugin-googleplus","labels_url":"https://api.github.com/repos/EddyVerbruggen/cordova-plugin-googleplus/issues/241/labels{/name}","comments_url":"https://api.github.com/repos/EddyVerbruggen/cordova-plugin-googleplus/issues/241/comments","events_url":"https://api.github.com/repos/EddyVerbruggen/cordova-plugin-googleplus/issues/241/events","html_url":"https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/241","id":157967531,"number":241,"title":"User Cancelled error when adding \"Youtube\" scope","user":{"login":"akirayuki129","id":17719794,"avatar_url":"https://avatars.githubusercontent.com/u/17719794?v=3","gravatar_id":"","url":"https://api.github.com/users/akirayuki129","html_url":"https://github.com/akirayuki129","followers_url":"https://api.github.com/users/akirayuki129/followers","following_url":"https://api.github.com/users/akirayuki129/following{/other_user}","gists_url":"https://api.github.com/users/akirayuki129/gists{/gist_id}","starred_url":"https://api.github.com/users/akirayuki129/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akirayuki129/subscriptions","organizations_url":"https://api.github.com/users/akirayuki129/orgs","repos_url":"https://api.github.com/users/akirayuki129/repos","events_url":"https://api.github.com/users/akirayuki129/events{/privacy}","received_events_url":"https://api.github.com/users/akirayuki129/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-01T17:49:49Z","updated_at":"2016-06-02T17:58:37Z","closed_at":null,"body":"When I call this.....\r\n\r\n```\r\nwindow.plugins.googleplus.login({\r\n         'scopes': 'profile email youtube',\r\n         'offline': true,  \r\n         'webClientId': '0000.apps.googleusercontent.com'\r\n},\r\n```\r\n\r\nIt shows the logged in accounts.  Then, after you tap one it immediately throws an error that says \"user cancelled\".  If I remove the \"youtube\" scope I get a token back but when I try to use it to call the youtube api I get this:\r\n\r\n```\r\n{\r\n\t\"error\": {\r\n\t\t\"errors\": [{\r\n\t\t\t\"domain\": \"global\",\r\n\t\t\t\"reason\": \"insufficientPermissions\",\r\n\t\t\t\"message\": \"Insufficient Permission\"\r\n\t\t}],\r\n\t\t\"code\": 403,\r\n\t\t\"message\": \"Insufficient Permission\"\r\n\t}\r\n}\r\n\r\n```\r\nI'm only testing on Android right now.  I'm using build.phonegap.com to build it.  This is in my config.xml:\r\n\r\n```\r\n<gap:plugin name=\"cordova-plugin-googleplus\" source=\"npm\">\r\n    <param name=\"REVERSED_CLIENT_ID\" value=\"com.googleusercontent.apps.-0000\" />\r\n  </gap:plugin>\r\n```\r\n\r\nSo, I think that means it is loading the latest version from npm, right?\r\n\r\nAny help would be appreciated.\r\n\r\nThanks!\r\n\r\nEric"},"comment":{"url":"https://api.github.com/repos/EddyVerbruggen/cordova-plugin-googleplus/issues/comments/223371395","html_url":"https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/241#issuecomment-223371395","issue_url":"https://api.github.com/repos/EddyVerbruggen/cordova-plugin-googleplus/issues/241","id":223371395,"user":{"login":"sammuggPS","id":8354240,"avatar_url":"https://avatars.githubusercontent.com/u/8354240?v=3","gravatar_id":"","url":"https://api.github.com/users/sammuggPS","html_url":"https://github.com/sammuggPS","followers_url":"https://api.github.com/users/sammuggPS/followers","following_url":"https://api.github.com/users/sammuggPS/following{/other_user}","gists_url":"https://api.github.com/users/sammuggPS/gists{/gist_id}","starred_url":"https://api.github.com/users/sammuggPS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sammuggPS/subscriptions","organizations_url":"https://api.github.com/users/sammuggPS/orgs","repos_url":"https://api.github.com/users/sammuggPS/repos","events_url":"https://api.github.com/users/sammuggPS/events{/privacy}","received_events_url":"https://api.github.com/users/sammuggPS/received_events","type":"User","site_admin":false},"created_at":"2016-06-02T17:58:37Z","updated_at":"2016-06-02T17:58:37Z","body":"Hey @akirayuki129,\r\n\r\nFirst, thanks for checking out the plugin!\r\n\r\nSecond, please refer to this [list of Google Identity scopes](https://developers.google.com/identity/protocols/googlescopes). I believe for your case you'd want the scopes passed in to be `'scopes': 'https://www.googleapis.com/auth/youtube'`.\r\n\r\nThird, note that profile and email are included by default, so you shouldn't need to add them to the list of scopes.\r\n\r\nFourth, you are correct that phonegap is pulling the latest code from NPM. If you want to use the github version, try this:\r\n```\r\n<gap:plugin spec=\"https://github.com/EddyVerbruggen/cordova-plugin-googleplus.git\" source=\"git\">\r\n    <param name=\"REVERSED_CLIENT_ID\" value=\"com.googleusercontent.apps.-0000\" />\r\n</gap:plugin>\r\n```\r\n\r\nI realize not all this info was documented. I'll update the README today!\r\n\r\nCheers!\r\n~Sam"}}
{"actor":{"display_login":"sammuggPS"}}