I am trying to establish an "implicit" Oauth2 authorization flow for my test connect in R to StackOverflow via the StackExchange API.
I am in situation #3 of this related post, that specifies how to set the redirect_uri and other values in a lanugage-agnostic way.
I've taken the steps described, namely setting up the app on StackApps.com to enable implicit authentication.
I've replicated the linked instructions in R with the httr library, the only major adaptation is that apparently httr requires the client secret earlier in the process than StackOverflow actually requires it.
library(httr)
# in the StackApps answer stackoverflow.com was used here.
# that just took me to the landing page.
# the docs use this URI and it gets me closer but
# it just says "Authorizing Application" with a blank page under that
# and it never completes.
end <- oauth_endpoint(authorize = "stackoverflow.com/oauth",
access = "stackoverflow.com/oauth")
client_secret = "secret_code_here"
myapp <- oauth_app("myapp",
key = "12665", # not a secret
secret = client_secret,
redirect_uri="https://stackexchange.com/oauth/login_success")
token <- oauth2.0_token(end,
myapp,
scope=NULL)
#,use_oob=T)
When I run my code a browser automatically opens and goes to StackOverflow.com. However, it just takes me to the landing page and Oauth never completes.
I tried it with use_oob=T and the only difference was that R prompted me for an authorization code that was never provided.

authorize = "stackoverflow.com/oauth/dialog"for starters andscopecan't be NULL. And iskeyactually sendingclient_id(in the HTTP request)? If not, that's a problem too.scopecouldn't be NULL. Fortunately the parameter it callskeyactually maps toclient_idin the URI. I will try some changes based on your comment and if that doesn't work I'll try a different library.use_oob=Tthen I even though it leads to that screen and doesn't complete, there's an authorization code in the URI. So if I copy that, then re-run it withoutuse_oob=Tthen I can paste the prior code I found in the URI as the Authorization Code. But that's terribly hacky. You see what I mean right? Basically it never works, but I can "hack" it by using info from 1 broken attempt to fix a different broken attempt lol.