Using OAuth 2.0 for Installed Applications
Vishmi Money <[email protected]>
| Newsgroups | gmane.comp.web.blogger.api |
|---|---|
| Message-ID | <[email protected]> |
I am developing a Windows 8 App for Blogger which allows create and update
blogs through the app.I am developing the app in C#/XAML using Visual
Studio 2012. For the login of a user I follow this link on Auth 2.0 client.
https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi
I have followed the initial step "Forming the URL" successfully and was
able to get the success code where it is asked to paste it in my
application.
I created a separate interface to paste it manually and get it to a
variable called code.
Then the next step, "Handling the Response" is unsuccessful in each time I
try.
I request you to help me to get trough this step.
POST /o/oauth2/token HTTP/1.1
Host: accounts.google.com
Content-Type: application/x-www-form-urlencoded
code=4/v6xr77ewYqhvHSyW6UJ1w7jKwAzu&
client_id=8819981768.apps.googleusercontent.com&
client_secret={client_secret}&
redirect_uri=https://oauth2-login-demo.appspot.com/code&
grant_type=authorization_code
Please tell me the way I can send a "Post" request in C# containing these
information and get the stated successful response as below.
{
"access_token":"1/fFAGRNJru1FTz70BzhT3Zg",
"expires_in":3920,
"token_type":"Bearer",
"refresh_token":"1/xEoDL4iW3cxlI7yDbSRFYNG01kVKM2C-259HOF2aQbI"
}
PS: Only limited type of methods in C# are allowed in developing Windows 8
apps.
--
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/bloggerdev.
For more options, visit https://groups.google.com/groups/opt_out.