Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

could not Exchange authorization code for refresh and access tokens

$
0
0

Hello friends 

I am creating google oauth 2.0 in asp.net (VB)

i receiced code from first request

but in second request when i need token i am not able to get

My code is 

code = Request.QueryString("code")

url = "https://accounts.google.com?code=" & code & "client_id=" & clientid & "&client_secret=" & Secret & "&redirect_uri=http://localhost:6969/googleAuthTest/go.aspx&grant_type=authorization_code&scope=" & scope
Dim Wrequest As HttpWebRequest = WebRequest.Create(url)

Using response As HttpWebResponse = Wrequest.GetResponse

     Dim reader As StreamReader = New StreamReader(response.GetResponseStream())

     Dim vals As String = reader.ReadToEnd()

                    
End Using


In this i am getting complete html page

I am refering google page 

https://developers.google.com/youtube/2.0/developers_guide_protocol_oauth2

Step No 4

Please Help how to do it

Thanks


Viewing all articles
Browse latest Browse all 23244

Trending Articles



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