Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: How to retrieve the parameters passed in a URI response

$
0
0
I'm trying to write come code that will store files in Dropbox but am struggling to understand how to read the parameters passed back from the /authorize oauth2 call to the redirect URI I have specified in my initial /authorize request.

I have created an http_listener and added a handler via support() which does get called when Dropbox redirects to the URI I have told it to call in my /authorize request for my Dropbox app but I just can't seem to get any of the dynamic data from the URI that is passed into my handler from the http_request object passed to my handler.

I can see the URL in the IE window I spawn to allow the user to authorize the app is of the form:

http://localhost:17776/authed#access_token=CT_otxYwHiYAAAAAAAAAAXCMh15CL9ApK_di68EZr21YK3OYabcdefZ1Va1Ns6a&token_type=bearer&uid=71964212&state=GazTest Where "http://localhost:17776/authed" is the URI I've passed to the /authorize call and I now need to access the access_token, token_type, uid and state parameters which I can't unfortunately seem to figure out how to do.

Any pointers would be gratefully received - I've trawled many samples and web sites but can't find what I need - everything I call just seems to return the static elements, e.g. the original URI path. This is my first dabbling into any kind of web development so please be gentle with me.

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>