{"action":"created","issue":{"url":"https://api.github.com/repos/hadley/httr/issues/379","repository_url":"https://api.github.com/repos/hadley/httr","labels_url":"https://api.github.com/repos/hadley/httr/issues/379/labels{/name}","comments_url":"https://api.github.com/repos/hadley/httr/issues/379/comments","events_url":"https://api.github.com/repos/hadley/httr/issues/379/events","html_url":"https://github.com/hadley/httr/issues/379","id":162832407,"number":379,"title":"Problem with expanding Scope in Uber API","user":{"login":"DataWookie","id":6134409,"avatar_url":"https://avatars.githubusercontent.com/u/6134409?v=3","gravatar_id":"","url":"https://api.github.com/users/DataWookie","html_url":"https://github.com/DataWookie","followers_url":"https://api.github.com/users/DataWookie/followers","following_url":"https://api.github.com/users/DataWookie/following{/other_user}","gists_url":"https://api.github.com/users/DataWookie/gists{/gist_id}","starred_url":"https://api.github.com/users/DataWookie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataWookie/subscriptions","organizations_url":"https://api.github.com/users/DataWookie/orgs","repos_url":"https://api.github.com/users/DataWookie/repos","events_url":"https://api.github.com/users/DataWookie/events{/privacy}","received_events_url":"https://api.github.com/users/DataWookie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-29T03:15:17Z","updated_at":"2016-06-29T09:54:09Z","closed_at":null,"body":"Hi Hadley,\r\n\r\nI trust that you are having a good time in Stanford. Wish I could be at useR2016 too!\r\n\r\nI've been having some trouble accessing the full scope of the Uber API via the httr package.\r\n\r\nFirst let's start with that works:\r\n\r\n```\r\nendpoint <- httr::oauth_endpoint(\r\n  authorize = \"https://login.uber.com/oauth/v2/authorize\",\r\n  access    = \"https://login.uber.com/oauth/v2/token\"\r\n)\r\napp <- httr::oauth_app(\"uber\", key = client_key, secret = client_secret)\r\n\r\nscope = \"profile\"\r\ntoken <- httr::oauth2.0_token(endpoint, app, scope = scope, cache = FALSE)\r\n```\r\n\r\nThat executes fine and I'm left with an authentication token with which I am able to access a subset of the Uber API. However, to get at all of the functionality I need to specify a broader range of options for scope.\r\n\r\nSo I make the change\r\n```\r\nscope = \"profile,request\"\r\n```\r\nbut that results in the following error:\r\n```\r\nWaiting for authentication in browser...\r\nPress Esc/Ctrl + C to abort\r\nAuthentication complete.\r\nError in init_oauth2.0(self$endpoint, self$app, scope = self$params$scope,  : \r\n  Bad Request (HTTP 400). Failed to get an access token.\r\n```\r\n\r\nIn the browser eveything seems to have proceeded as before.\r\n\r\nI did read somewhere that https was required for the redirect URL to make this work. Could that perhaps be the source of the problem?\r\n\r\nPlease let me know if I can provide additional information to resolve this issue.\r\n\r\nBest regards,\r\nAndrew."},"comment":{"url":"https://api.github.com/repos/hadley/httr/issues/comments/229311290","html_url":"https://github.com/hadley/httr/issues/379#issuecomment-229311290","issue_url":"https://api.github.com/repos/hadley/httr/issues/379","id":229311290,"user":{"login":"Stormseer","id":18208643,"avatar_url":"https://avatars.githubusercontent.com/u/18208643?v=3","gravatar_id":"","url":"https://api.github.com/users/Stormseer","html_url":"https://github.com/Stormseer","followers_url":"https://api.github.com/users/Stormseer/followers","following_url":"https://api.github.com/users/Stormseer/following{/other_user}","gists_url":"https://api.github.com/users/Stormseer/gists{/gist_id}","starred_url":"https://api.github.com/users/Stormseer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stormseer/subscriptions","organizations_url":"https://api.github.com/users/Stormseer/orgs","repos_url":"https://api.github.com/users/Stormseer/repos","events_url":"https://api.github.com/users/Stormseer/events{/privacy}","received_events_url":"https://api.github.com/users/Stormseer/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T09:54:08Z","updated_at":"2016-06-29T09:54:08Z","body":"Hey! I figured I'd cross-post what I found while poking around for a potential fix for the Rfacebook issue.\r\n\r\n> I'm also getting the same issue, so I decided to poke around a little and I found the following:\r\n> \r\n> > **All Callback Subscriptions Must Use HTTPS** - When we launched Graph API v2.5 last October we began requiring new Webhooks (formerly known as Real Time Updates) subscriptions to be configured for HTTPS. With v2.6, this is now required for all new Dynamic Pricing and Deauthorization endpoints as well. Beginning 90 days from today, we will require all callback subscriptions to be configured for HTTPS. At that point, we will stop sending updates to non-HTTPS endpoints, regardless of when they were created. This applies to Webhooks, Webhooks for Payments, Dynamic Pricing, and Deauthorization. You can update your subscriptions on your app dashboard.\r\n> \r\n> [(Source)](https://developers.facebook.com/docs/apps/changelog)\r\n> \r\n> I believe this issue is caused by Rfacebook using HTTP, which is no longer supported.\r\n\r\nThe error being experienced is due to the API(s) denying all HTTP requests, requiring HTTPS instead."}}
{"actor":{"display_login":"Stormseer"}}