Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Uploading to Imgur with Perl

by Cody Fendant (Friar)
on Apr 12, 2013 at 23:11 UTC ( #1028466=perlquestion: print w/replies, xml ) Need Help??
Cody Fendant has asked for the wisdom of the Perl Monks concerning the following question:

Has anyone managed to make Image::Imgur work?

The POD is missing the line where you actually create the object, (someone's added it on AnnoCPAN) but it doesn't work for me anyway. There's also a host() method mentioned which doesn't seem to exist either.

What I get returned is '1004' which means invalid API key. But Imgur doesn't have "API keys", it has OAuth client IDs and client secrets etc.

Does this Module work for anyone?

Replies are listed 'Best First'.
Re: Uploading to Imgur with Perl
by davido (Archbishop) on Apr 12, 2013 at 23:59 UTC

    From the deficient test suite you can see an example of how it's intended to be instantiated (I've obscured an email address and the API key, but you can find them in the test file):

    # API Key provided by my $apikey = "b3625162_____________805b1840452"; my $imgur = new Image::Imgur(key=>$apikey); ok( $imgur ); my $result = $imgur->upload(' +ng'); ok( $result );

    There is this explanation in the docs for WWW::Imgur:

    Image::Imgur is an alternative module for It uses the XML version of the API rather than the JSON one which WWW::Imgur uses, and it depends on the Moose module. It uses an older version of the Imgur API.

    I noticed also that WWW::Imgur says that even that module (WWW::Imgur) is using the deprecated API, so the one that Image::Imgur is using must really be outdated (and possibly no longer operational).


      Wow, somehow I missed how old it was. Both those modules are completely obsolete now, it appears.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1028466]
Approved by marto
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2016-10-22 13:50 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (294 votes). Check out past polls.