user4191887
user4191887

Reputation: 277

Imgur OAuth2 Authentication and Upload C#

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?

Upvotes: 4

Views: 692

Answers (1)

mano
mano

Reputation: 136

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.

Upvotes: 1

Related Questions