Re: Uploading images to Imgur using c#

613 views
Skip to first unread message

@jasdev

unread,
Dec 17, 2014, 1:28:21 PM12/17/14
to im...@googlegroups.com
Hey Erel!

You're going to need to set an Authorization header with your Client-ID and make a POST request to `https://api.imgur.com/3/image` with the following form data:
  • `image` with value of the URL you want to upload
  • `type` with value `url`
Your Authorization HTTP header should be set like so: `Authorization: Client-ID YOUR_CLIENT_ID`

Below are links to the relevant docs, hope this helps!


Jasdev

@jasdev

unread,
Dec 17, 2014, 11:44:50 PM12/17/14
to im...@googlegroups.com
Erel, I've attached a small snippet which can help you get going! Hope this helps!

@jasdev

unread,
Dec 18, 2014, 1:10:55 PM12/18/14
to im...@googlegroups.com
Hey Erel!

Without the error I can't really tell what's up, but I'm guessing you're running into the rate-limits I mentioned in my previous post.


Please be cognizant in your code to avoid hitting these rate-limits too often.

Best,

Jasdev

@jasdev

unread,
Dec 18, 2014, 1:27:36 PM12/18/14
to im...@googlegroups.com
Looks like C# does have a native JSON library. Give that a try!

All API responses are wrapped in JSON, so there is no way to just get the link string back.

Hope this helps!

Jasdev
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages