I am using the httr
v0.2 package to use the github api as well now. But I am struggling to get past the oauth2.0(...)
part in which I get to the browser page for my app, click on 'Allow' and then get redirected to the callback URL page.
The httr github demo suggests using the callback URL as http://localhost:1410
but when I get redirected to that page, google chrome suggests that it could not connect to the page and the page it is getting re-directed to is http://localhost:1410/?error=redirect_uri_mismatch&state=DZNFcm8tnq
...so I tried a bunch of other ports and overall URLS to no success...
What would be another callback URL and URL that would work?
below is the code I used
require(httr)
## Loading required package: httr
github.app <- oauth_app("github","xxxxx", "xxxxxxxxxxxxxxx")
github.urls <- oauth_endpoint(NULL, "authorize", "access_token",base_url = "https://github.com/login/oauth")
github.token <- oauth2.0_token(github.urls,github.app)
## Loading required package: Rook
## Loading required package: tools
## Loading required package: brew
## starting httpd help server ... done
## Waiting for authentication in browser...
which is when I get directed to a page that has the 'Allow' button whichIi click after which I get redirected to the page in google chrome that cannot connect to localhost :1410