--Hi,I'm trying to access Infos from a google-account using DNOA and OAuth 2. I managed to receive an access_code via my callback-url but when I try to get a token for it using
ProcessUserAuthorization Google responds with a 400 Bat Request.Below I place the info from the log.What's wrong here?
Wishes,Fred
2012-07-22 23:59:30,841 (GMT+2) [8] INFO DotNetOpenAuth.Messaging.Channel - Prepared outgoing AccessTokenAuthorizationCodeRequestC (2.0) message for https://accounts.google.com/o/oauth2/token:
code: 4/1d8s68ygIOBtte-Furt6QZPT1AFI.sqjLPoQNiZIfsNf4jSVKMpaseHphcQI
redirect_uri: https://localhost/RP/Secure/OAuth
grant_type: authorization_code2012-07-22 23:59:30,841 (GMT+2) [8] DEBUG DotNetOpenAuth.Messaging.Channel - Sending AccessTokenAuthorizationCodeRequestC request.
2012-07-22 23:59:30,841 (GMT+2) [8] DEBUG DotNetOpenAuth.Messaging.Channel - Sending AccessTokenAuthorizationCodeRequestC request.
2012-07-22 23:59:31,512 (GMT+2) [8] DEBUG DotNetOpenAuth.Http - HTTP POST https://accounts.google.com/o/oauth2/token
2012-07-22 23:59:31,512 (GMT+2) [8] DEBUG DotNetOpenAuth.Http - HTTP POST https://accounts.google.com/o/oauth2/token
2012-07-22 23:59:32,465 (GMT+2) [8] ERROR DotNetOpenAuth.Http - WebException from https://accounts.google.com/o/oauth2/token:
{
"error" : "invalid_request"
}
To unsubscribe from this group, send email to dotnetopenid+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/dotnetopenid/-/EQ7AQBnT-cYJ.
To post to this group, send email to dotnet...@googlegroups.com.
To unsubscribe from this group, send email to dotnetopenid...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dotnetopenid?hl=en.
POST https://accounts.google.com/o/oauth2/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=utf-8
User-Agent: DotNetOpenAuth/4.1.0.12182
Host: accounts.google.com
Cache-Control: no-store,no-cache
Pragma: no-cache
Content-Length: 158
Expect: 100-continue
Connection: Keep-Alive
code=4%2FbiqWK38xZ5p_sRPqCahWqggwmQYN.os6DXXaAEkgUsNf4jSVKMpbEaYpzcQI&redirect_uri=https%3A%2F%2Flocalhost%2FRP%2FSecure%2FOAuth&grant_type=authorization_code
[2]
HTTP/1.1 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Date: Tue, 24 Jul 2012 16:13:11 GMT
Content-Type: application/json
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Content-Length: 33
{
"error" : "invalid_request"
}
[3]
POST /o/oauth2/token HTTP/1.1
Host: accounts.google.com
Content-Type: application/x-www-form-urlencoded
code=4/P7q7W91a-oMsCeLvIaQm6bTrgtp7&
client_id=8819981768.apps.googleusercontent.com&
client_secret={client_secret}&
redirect_uri=https://oauth2-login-demo.appspot.com/code&
grant_type=authorization_code
[4] https://developers.google.com/accounts/docs/OAuth2WebServer
To view this discussion on the web visit https://groups.google.com/d/msg/dotnetopenid/-/1T6eJwIw3EQJ.
To post to this group, send email to dotnet...@googlegroups.com.
To unsubscribe from this group, send email to dotnetopenid...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dotnetopenid?hl=en.
To unsubscribe from this group, send email to dotnetopenid+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dotnetopenid?hl=en.
--
You received this message because you are subscribed to the Google Groups "DotNetOpenAuth" group.
To view this discussion on the web visit https://groups.google.com/d/msg/dotnetopenid/-/6EpCVfQOpoQJ.
To unsubscribe from this group, send email to dotnetopenid...@googlegroups.com.