Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8348583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:44:05+00:00 2026-06-09T07:44:05+00:00

This works: $.post( ‘http://api.imgur.com/2/upload.json’, { key: ‘dsfdwerwersf53534dfsfse3’, image: ‘http://i.imgur.com/UH17u.png’ }, function( data ) {

  • 0

This works:

    $.post( 
        'http://api.imgur.com/2/upload.json', 
        { 
            key: 'dsfdwerwersf53534dfsfse3', 
            image: 'http://i.imgur.com/UH17u.png' 
        }, 
        function( data ) { console.log( data.upload.links.original ); }
    );

When I run this in Chrome’s console, imgur sends me the url of the uploaded image right away: http://i.imgur.com/KrHMY.png. Excellent.

.

Now I’m try the same thing on the server-side using node.js but it doesn’t work:

    var 
        express = require( 'express' )
    ,   app = express.createServer()
    ,   request = require( 'superagent' );


    app.get( '/', function( req, res ) {
        request
            .post( 'http://api.imgur.com/2/upload.json' )
            .send( { key: 'dsfdwerwersf53534dfsfse3', image: 'http://i.imgur.com/UH17u.png' } )
            .end( function( data ) {
                console.log( data.upload.links.original );
            });
    });

    app.listen( '8080' );

When I run the node.js app, imgur sends back this response:

text: '{"error":{"message":"No API key was sent, and no user is authenticated","request":"\\/2\\/upload.json","method":"post","format":"json","parameters":"image = {\\"key\\":\\"dsfdwerwersf53534dfsfse3\\",\\"image\\":\\"http:\\/\\/i.imgur.com\\/UH17u.png\\"}"}}',

The key part is this: No API key was sent. Why isn’t imgur recognizing the key I’m sending with the POST?

I’ve tried using both request and superagent modules. I feel silly not being able to figure out why something so simple isn’t working. Appreciate any pointers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:44:08+00:00Added an answer on June 9, 2026 at 7:44 am

    jQuery does sometime so much magie that it is hard to see it.

    Here I’d bet two thing either, I have not used superagent in month and I had stupid error like this one that made me sad.

    But here I bet that the body is a to string at best a json or your object.
    JQuery by default urlencode just like most API want the POST body to be.
    Use

    var = require('querystring');
    /*...*/
    .send(qs.encode({ key: '...', image: '...' }))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://madisonlane.businesscatalyst.com I'm trying to get the div#sign-post to sit above the div#bottom. This works
$.post($(this).attr(action), $(this).serialize(), function(json) { alert('red'); AddItemAjax(json); }, json); This works in Chrome but not
This JSON post works, but if I start clicking them quickly, they start returning
I was asked to post this as a question on StackOverflow by http://twitter.com/jonathanjulian which
I am using the following code to do a HTTP Post. This works fine
I am sending data to PHP through HTTP POST. This works fine for data
Im writing a form to post data off to paypal, and this works fine,
I can't figure out why... This works: <?php if($_POST['test']) echo posted; ?> <form method=POST
This is my code that works perfectly to post one object to my server.
I have this code that works well: {livre:empty_name} $.ajax({ url: sent.php, type: post, dataType:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.