0

ASP.NET Core 2.0
I have a problem with catching the final url after all redirects. There are a redirect using js as shows photo below, so HttpClient contains only first page url as RequestUri. It's also true for HttpWebRequest and SimpleBrowser.
Look here
I need to get https://oauth.vk.com/blank.html#access_token=bee0e251e716bd3ece938db0ab47c2bf530ccc856710c51d357b4ec0d3da2865a3a0fd93f7393a177c14c&expires_in=86400&user_id=301771062
Token is expired, don't try to use it

UPDATE ResponseUri and RequestUri are the same

panda_eye
  • 166
  • 6

1 Answers1

0

Try looking in the HttpWebResponse.ResponseUri

Possibly related: How to get redirected url as string after request

drone6502
  • 433
  • 2
  • 7
  • I tried ResponseUri, as I wrote there was the first url `https://oauth.vk.com/authorize?client_id=6055184&display=page&redirect_uri=https://oauth.vk.com/blank.html&scope=friends,wall,photos,messages&response_type=token&v=5.68` – panda_eye Aug 25 '17 at 18:25
  • Ok, then you might want to edit your question, because it says that you found that original value in the RequestUri, whereas I was suggesting that you look at the ResponseUri returned in the HttpWebResponse. – drone6502 Aug 25 '17 at 18:35
  • it also contains url as I said above. Request url and response url are the same – panda_eye Aug 25 '17 at 18:50