4

I have created a C# Windows Form Program that enables the user to drag and drop an image, pasting the url to that image into a text box. I now have to do the API side of this and authenticate with Imgur. Since I will be the only one using this program this should go easily but I cannot find much documentation on how one would authenticate with OAuth using C#. More specifically, I also cannot find any documentation on how to upload images with C# to Imgur. If anything, I would like to have it upload the image into a certain album as well, if that is even a possibility.

Could anyone help at all?

6
  • Look at this, may help you? stackoverflow.com/questions/2073519/uploading-to-imgur-com Commented Feb 15, 2016 at 0:10
  • No, that's for posting anonymous images and I'm looking to authenticate and post on an account Commented Feb 15, 2016 at 0:13
  • Gotcha, Well....I'm afraid I'm not much help on topic, typically each site or whatever has it's own way of authenticating, like Facebook you have to register an app and get a secret key or something like that, similar process for Google, etc. so unless Imgur has something like that there isn't really any way to do this since you'd have to touch their database. Commented Feb 15, 2016 at 0:16
  • I do have my secret key but you need to get authenticated through the browser to access a specified person's account Commented Feb 15, 2016 at 0:18
  • stackoverflow.com/a/24270278/1070452 Commented Feb 15, 2016 at 1:04

1 Answer 1

1

OAuth2 is authorization standard, you can find rfc specification here. Lot of web applications implements this which means that if you have oauth2 client you can "log in" to any of those applications. Basically what you need to do is read this Imgur document, which explains how you need implement your oauth2 client to log into their app.

In C# its just bunch of HTTP requests, so you can implement it with use of classes like HttpClient or you can look for already implemented c# oauth2 client nuget. Than you just pass some urls to that client and your done with authorization.

For the upload part you have to read documentation for upload api and again implement the client of that api.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.