{"action":"opened","issue":{"url":"https://api.github.com/repos/requests/requests-oauthlib/issues/173","labels_url":"https://api.github.com/repos/requests/requests-oauthlib/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/requests/requests-oauthlib/issues/173/comments","events_url":"https://api.github.com/repos/requests/requests-oauthlib/issues/173/events","html_url":"https://github.com/requests/requests-oauthlib/issues/173","id":59187275,"number":173,"title":"Scope change warning (actually an error) when fetching tokens","user":{"login":"josephtate","id":312403,"avatar_url":"https://avatars.githubusercontent.com/u/312403?v=3","gravatar_id":"","url":"https://api.github.com/users/josephtate","html_url":"https://github.com/josephtate","followers_url":"https://api.github.com/users/josephtate/followers","following_url":"https://api.github.com/users/josephtate/following{/other_user}","gists_url":"https://api.github.com/users/josephtate/gists{/gist_id}","starred_url":"https://api.github.com/users/josephtate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephtate/subscriptions","organizations_url":"https://api.github.com/users/josephtate/orgs","repos_url":"https://api.github.com/users/josephtate/repos","events_url":"https://api.github.com/users/josephtate/events{/privacy}","received_events_url":"https://api.github.com/users/josephtate/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-27T04:16:32Z","updated_at":"2015-02-27T04:16:32Z","closed_at":null,"body":"My test script is pretty much straight from the http://requests-oauthlib.readthedocs.org/en/latest/examples/google.html Google OAuth2 tutorial.\r\n\r\n```\r\n#My test script\r\nclient_id =  '<snipped>.apps.googleusercontent.com'\r\nclient_secret = '<snipped>'\r\nredirect_uri = '<snipped>'\r\ntoken_url = \"https://accounts.google.com/o/oauth2/token\"\r\nauthz_url_base = 'https://accounts.google.com/o/oauth2/auth'\r\nscope = ['https://www.googleapis.com/auth/plus.me', 'email']\r\n\r\nfrom requests_oauthlib import OAuth2Session\r\n\r\ngoogle = OAuth2Session(client_id, scope=scope, redirect_uri=redirect_uri)\r\n\r\nauthorization_url, state = google.authorization_url(authz_url_base, access_type=\"online\")\r\n\r\nprint 'Please go here and authorize,', authorization_url\r\n\r\nredirect_response = raw_input('Paste the full redirect URL here:')\r\n\r\ngoogle.fetch_token(token_url, client_secret=client_secret, authorization_response=redirect_response)\r\n```\r\n\r\nAnd here's the output:\r\n\r\n```\r\nPlease go here and authorize, https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=<snipped>\r\nPaste the full redirect URL here:<snipped>\r\nTraceback (most recent call last):\r\n  File \"test.py\", line 18, in <module>\r\n    google.fetch_token(token_url, client_secret=client_secret, authorization_response=redirect_response)\r\n  File \"/home/jtate/.virtualenvs/crunch/local/lib/python2.7/site-packages/requests_oauthlib/oauth2_session.py\", line 199, in fetch_token\r\n    self._client.parse_request_body_response(r.text, scope=self.scope)\r\n  File \"/home/jtate/.virtualenvs/crunch/local/lib/python2.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py\", line 409, in parse_request_body_response\r\n    self.token = parse_token_response(body, scope=scope)\r\n  File \"/home/jtate/.virtualenvs/crunch/local/lib/python2.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py\", line 376, in parse_token_response\r\n    validate_token_parameters(params)\r\n  File \"/home/jtate/.virtualenvs/crunch/local/lib/python2.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py\", line 406, in validate_token_parameters\r\n    raise w\r\nWarning: Scope has changed from \"email https://www.googleapis.com/auth/plus.me\" to \"\".\r\n```\r\n\r\nIt looks like the Session object's scope isn't passed down into the oauthlib token parsing lib causing the error every time."}}