Oh. I misspeled URL and URI in browser request i did redirect_url and in post redirect_uri. I was not expecting it becouse the first thing worked well.
The provided value for the 'redirect_uri' is not valid.
I'm trying to get auth token and refresh token after retriving auth code from oauth authorization. I'm getting error that redirect urls must be equal. They are both "http://localhost:23566/auth". This url is also registered in application
OAuth browser url
https://login.live.com/oauth20_authorize.srf?client_id=<id>&response_type=code&redirect_url=http://localhost:23566/auth&scope=XboxLive.signin+offline_access
POST Request:
https://login.live.com/oauth20_token.srf
client_id=<clientID>&client_secret=<secret>&code=<code>&grant_type=authorization_code&redirect_uri=http://localhost:23566/auth
I get error after sending the request
The provided value for the 'redirect_uri' is not valid. The value must exactly match the redirect URI used to obtain the authorization code.