-1
我'嘗試與谷歌打交道的OAuth2試圖從谷歌請求訪問令牌的oauth2
我的應用程序VILL被所謂的服務器應用程序開始。它應該在沒有用戶輸入的情況下工作。到目前爲止我的代碼(僅試圖獲得訪問令牌):
Dim strToken = Request.QueryString("code")
Dim strExchange = "response_type=code"
strExchange += "&redirect_uri=http://xxxx.zzzzz.com/test/google.aspx"
strExchange += "&client_id=xxxx7hju.apps.googleusercontent.com"
strExchange += "&scope=&"
strExchange += "client_secret=yJpGI1yQBCvvxxxxx&grant_type=authorization_code"
Dim url = "https://accounts.google.com/o/oauth2/auth?"
Dim webClient As New System.Net.WebClient
Dim result As String = webClient.DownloadString(url & strExchange)
Response.Write(result)
這讓我壞reguest(400)
什麼是主要用戶? – Timo77
主要用戶驗證用戶的郵件ID – 2015-05-29 15:51:15
請求中的重定向URI:http://xx.xxxx.xom/xx/google.aspx與註冊的重定向URI不匹配。我懂了。在API控制檯上有一些地方我應該添加網址嗎? – Timo77