Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Imgur API Authorization issues

Tags:

imgur

I've been teaching myself how to use react and meteor and I'm following a course on Udemy. The first project we have to do requires the imgur gallery endpoint which is : https://api.imgur.com/3/gallery/hot/viral/0.json.

Obviously however I get the error saying "authorization required".

I am trying to complete the authorization that is here: https://apidocs.imgur.com/. However, at step 3, where I'm supposed to generate the new token, I get an error in the Postman Console saying:

{"data":{"error":"redirect_uri_mismatch","request":"/oauth2/authorize","method":"GET"},"success":false,"status":400}

Exactly what am I doing wrong?

I also uploaded a picture with the error I am getting in console. I am not sure if you need more or not as I am pretty clueless to what is going on so far. https://i.sstatic.net/IGZgp.png

like image 669
John Tanner Avatar asked Aug 25 '26 11:08

John Tanner


1 Answers

I had this same issue. The problem was that the redirect for the Imgur application I registered did not match the callback URI I had configured in Postman.

When I registered the application with Imgur, I did not set a callback URI for the application in Imgur because I don't need one for the oauth2 flow I'm using, however Imgur automatically set up a redirect for it, to https://imgur.com.

Setting the Postman callback URL to match the Imgur redirect URL for my application resolved this error message.

You can view the redirect settings for your Imgur application at https://imgur.com/account/settings/apps, and change them as needed using the edit function there. Since your setup is working from the command line, you should be able to just copy whatever URL is currently there to your Postman callback configuration and it should work!

like image 104
Jason Ross Avatar answered Aug 31 '26 04:08

Jason Ross



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!