This API documentation has moved to apidocs.imgur.com
This version has been deprecated and will soon automatically redirect to the new docs.
General Information
The easiest way to check if there was in error is to check the
status code. If it’s anything other than 200, then an error
occurred.
Sometimes it’s useful to always return a 200 status code and to
check the error message instead. If you wish to do this, the global parameter «_fake_status» can be
passed in and set to true. For example,
GET: https://api.imgur.com/3/account/imgur/images.xml?_fake_status=200
This works for both GET and POST request methods.
Example Error
Trying to access a protected resource without the proper
credentials will cause the following error to occur:
XML:
<data>
<error>This method requires authentication</message>
<request>/3/account</request>
<method>GET</methed>
</data>
<success>false</success>
<status>403</status>
JSON:
{
"data": {
"error": "This method requires authentication",
"request": "/3/account.json",
"method": "GET",
},
"success": false,
"status": 403
}
Status Code: 200
The request has succeeded and there were no errors. Congrats!
Status Code: 400
This error indicates that a required parameter is missing or a
parameter has a value that is out of bounds or otherwise
incorrect. This status code is also returned when image uploads
fail due to images that are corrupt or do not meet the format
requirements.
Status Code: 401
The request requires user authentication. Either you didn’t send
send OAuth credentials, or the ones you sent were invalid.
Status Code: 403
Forbidden. You don’t have access to this action. If you’re
getting this error, check that you haven’t run out of API
credits or make sure you’re sending the OAuth headers correctly
and have valid tokens/secrets.
Status Code: 404
Resource does not exist. This indicates you have requested a
resource that does not exist. For example, requesting an image
that doesn’t exist.
Status Code: 429
Rate limiting. This indicates you have hit either the rate
limiting on the application or on the user’s IP address.
Status Code: 500
Unexpected internal error. What it says. We’ll strive NOT to
return these but your app should be prepared to see it. It
basically means that something is broken with the Imgur service.
Bug Description
The Imgur post embed generates AMP tag, it uses post id as data-imgur-id, and it creates incorrect embed URL: https://imgur.com/2q6AS6i/embed?pub
so it’s not displayed on the AMP page.
<amp-imgur data-imgur-id="2q6AS6i" layout="responsive" width="540" height="633" > </amp-imgur>
In the official AMP documentation, there is no information available for Imgur post embed.
https://amp.dev/documentation/components/amp-imgur/
And there is a merged PR to add the support for Imgur posts:
#23829
Expected Behaviour
The Imgur post embed should generate data-imgur-id
as a/<post_id>
. It generates the correct embed URL https://imgur.com/a/2q6AS6i/embed?pub
.
<amp-imgur data-imgur-id="a/2q6AS6i" layout="responsive" width="540" height="633" > </amp-imgur>
Steps to reproduce
- Edit/Create WordPress post.
- Add an Imgur post URL. eg. https://imgur.com/gallery/2q6AS6i
- Submit the post.
- View it on AMP mode
Screenshots
Additional context
- WordPress version: 5.4
- Plugin version: 1.5.3
- AMP plugin template mode: Standad
- PHP version: 7.4
- OS: Windows 10
- Browser: Google Chrome
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
Я продолжаю получать 404 кода ошибки, когда пытаюсь зайти на i.imgur.com. Использование разных браузеров или режима инкогнито не помогает. Тем не менее, при использовании моего телефона (в той же сети) я могу достичь его нормально. Кроме того, я попытался с виртуальной машиной, и это также сработало. Любые идеи о том, что может быть причиной этого?
Я использую Windows 7, спасибо!
user71606
04 авг ’13 в 04:15
2013-08-04 04:15
2013-08-04 04:15
1
ответ
Решение
Отчитываться Проблема заключалась в том, что я изменил свой файл hosts несколько месяцев назад (чтобы решить какую-то другую проблему) и забыл об этом. Затем изменился IP-адрес i.imgur.com, и это вызвало мою проблему. Возврат моих изменений в файле hosts решил проблему. Так что если у вас похожая проблема в Windows, проверьте%SystemRoot%system32driversetchosts
user71606
21 окт ’13 в 23:21
2013-10-21 23:21
2013-10-21 23:21
user71606
2013-08-04 в 04:15
Я продолжаю получать 404 кода ошибки, когда пытаюсь зайти на i.imgur.com. Использование разных браузеров или режима инкогнито не помогает. Тем не менее, при использовании моего телефона (в той же сети) я могу достичь его нормально. Кроме того, я попытался с виртуальной машиной, и это также сработало. Есть идеи, что может быть причиной этого?
Я использую Windows 7, спасибо!
i.imgur.com перенаправляет на imgur.com. Таким образом, вы можете получить доступ к imgur.com, но не к i.imgur.com?
bdr9 9 лет назад
0
Я думаю, что imgur.com обслуживает файлы html, js и css, а фактические изображения — с i.imgur.com (который является CDN).
user71606 9 лет назад
0
Отчитываться Проблема заключалась в том, что я изменил свой файл hosts несколько месяцев назад (чтобы решить какую-то другую проблему) и забыл об этом. Затем изменился IP-адрес i.imgur.com, и это вызвало мою проблему. Возврат моих изменений в файле hosts решил проблему. Так что если у вас похожая проблема в Windows, проверьте% SystemRoot% system32 drivers etc hosts
user71606 9 лет назад
0
Рад слышать, что вы решили проблему. Вы должны опубликовать свое решение в качестве ответа, а затем принять его, чтобы этот вопрос был помечен как решенный.
bdr9 9 лет назад
0
1 ответ на вопрос
user71606
2013-10-21 в 23:21
Reporting back. The problem was that I had modified my hosts file a few months back (to solve some other issue) and I forgot about it. Then i.imgur.com IP address changed and that caused my problem. Reverting my hosts file changes solved the issue. So if you have a similar problem in Windows, check %SystemRoot%system32driversetchosts
Похожие вопросы
-
2
Windows 7 Home Premium запоминает пароли общего доступа к сети?
-
4
Как заблокировать выровненные по правому краю панели инструментов в Windows 7, чтобы они не выглядел…
-
4
Функция Windows 7 «Aero Snap» в Ubuntu GNOME
-
-
3
Мой второй жесткий диск не виден в Windows 7
-
7
Как заменить Блокнот в Windows 7?
-
2
Как расположить значки панели задач Windows 7 в 2 ряда?
-
1
Проблемы во время сна на Windows 7
-
6
Как управлять функцией привязки Windows 7 с помощью двух мониторов?
-
10
Как мне обновить Windows 7 RC до Windows 7 RTM?
-
3
Какая защита от шпионского ПО доступна для Windows 7?
Asked
3 years, 3 months ago
Viewed
181 times
First attempt at using the Imgur API for OAuth2 authentication. I have a Client ID and Client Secret from https://api.imgur.com/oauth2/addclient. The URL that is being called from my Vue application looks like:
https://api.imgur.com/oath2/authorize?client_id={CLIENT_ID}&response_type=token&state=test
…where {CLIENT_ID}
is the Client ID obtained from the client registration. This doesn’t work from my web app and also fails in Postman. I’m getting back a 404 which displays the page that reads, «Zoinks! You’ve taken a wrong turn.»
Any advice is appreciated.
asked Feb 24, 2020 at 16:53
I had the same problem. For me the solution was to open my Vue application from the network address https://192.168.2.100:8080
instead of the local adress https://localhost:8080
Vue console picture
Imgur apparently doesn’t accept requests from localhost. Consequently I also had to set the OAuth2 redirect url of my application registered in imgur to http://192.168.2.100:8080/...
answered Mar 10, 2021 at 11:44
EdvardEdvard
3462 silver badges9 bronze badges
I keep getting 404 error codes when I try to go to i.imgur.com. Using different browsers or incognito mode doesn’t help. However, when using the my phone (on the same network) I can reach it fine. Also, I tried with a virtual machine and it also worked. Any ideas of what could be the cause of this?
I am using Windows 7, thanks!
asked Aug 4, 2013 at 4:15
4
Reporting back. The problem was that I had modified my hosts file a few months back (to solve some other issue) and I forgot about it. Then i.imgur.com IP address changed and that caused my problem. Reverting my hosts file changes solved the issue. So if you have a similar problem in Windows, check %SystemRoot%system32driversetchosts
answered Oct 21, 2013 at 23:21
user71606user71606
1512 silver badges4 bronze badges
[BUG] Imgur gallery gives 404 in sync but works in gallery
Imgur gallery gives 404 in sync but works in browser*
Scenario(steps to reproduce)
Here is a link https://www.reddit.com/r/videos/comments/m543wk/_/gqyqadw?context=1000
Result(s)
Error loading album
Status code: 404
Network time 452ms
Device information
Sync version: 19.0.7 Sync flavor: pro View type: Full height cards Player type: ExoPlayer Push enabled: false Device: sunfish Model: Google Pixel 4a Android: 11
Перейти к контенту
This API documentation has moved to apidocs.imgur.com
This version has been deprecated and will soon automatically redirect to the new docs.
General Information
The easiest way to check if there was in error is to check the
status code. If it’s anything other than 200, then an error
occurred.
Sometimes it’s useful to always return a 200 status code and to
check the error message instead. If you wish to do this, the global parameter «_fake_status» can be
passed in and set to true. For example,
GET: https://api.imgur.com/3/account/imgur/images.xml?_fake_status=200
This works for both GET and POST request methods.
Example Error
Trying to access a protected resource without the proper
credentials will cause the following error to occur:
XML:
<data>
<error>This method requires authentication</message>
<request>/3/account</request>
<method>GET</methed>
</data>
<success>false</success>
<status>403</status>
JSON:
{
"data": {
"error": "This method requires authentication",
"request": "/3/account.json",
"method": "GET",
},
"success": false,
"status": 403
}
Status Code: 200
The request has succeeded and there were no errors. Congrats!
Status Code: 400
This error indicates that a required parameter is missing or a
parameter has a value that is out of bounds or otherwise
incorrect. This status code is also returned when image uploads
fail due to images that are corrupt or do not meet the format
requirements.
Status Code: 401
The request requires user authentication. Either you didn’t send
send OAuth credentials, or the ones you sent were invalid.
Status Code: 403
Forbidden. You don’t have access to this action. If you’re
getting this error, check that you haven’t run out of API
credits or make sure you’re sending the OAuth headers correctly
and have valid tokens/secrets.
Status Code: 404
Resource does not exist. This indicates you have requested a
resource that does not exist. For example, requesting an image
that doesn’t exist.
Status Code: 429
Rate limiting. This indicates you have hit either the rate
limiting on the application or on the user’s IP address.
Status Code: 500
Unexpected internal error. What it says. We’ll strive NOT to
return these but your app should be prepared to see it. It
basically means that something is broken with the Imgur service.
Every other image I see hotlinked from Imgur returns a «403 — Forbidden» error.
If I copy and paste the link into my browser the image will load. Or if I delete the initial i.
in the URL, the image loads.
The image will not load if it’s used in a BBCode style tag, or if I right click on it and choose open in a new tab.
Do you know the cause or a fix?
These are a couple of examples that you’ll probably be able to see, but I can’t unless I do one of those above mentioned actions:
View post on imgur.com
View post on imgur.com
pnuts
17.1k5 gold badges51 silver badges103 bronze badges
asked Apr 13, 2012 at 23:02
Louis WaweruLouis Waweru
1,5945 gold badges21 silver badges41 bronze badges
2
I found out that imgur has an outright ban on the site for some reason. No one knows why.
The workaround is to use the site’s https connection, then the images will load. We guess imgur didn’t ban https://site.com.
answered May 16, 2012 at 0:59
Louis WaweruLouis Waweru
1,5945 gold badges21 silver badges41 bronze badges
1
I’m in the same boat with Greenshot’s Imgur Plugin. Greenshot is awesome.
According to Imgur Documentation
Status Code: 403
Forbidden. You don’t have access to this action. If you’re getting this error, check that you haven’t run out of API credits or make sure you’re sending the OAuth headers correctly and have valid tokens/secrets.
I assume in my case that many other people love Greenshot and the application just ran out of API credits or something? In your case it sounds like a broken authentication token though I’m knowledge about enough to know how to hypothetically even approach fixing it.
Edit:
ShareX a similar screen shot program seems to have run into a similar problem at some point and the problem on their end was users had to reauthenticate. I’m going to try it on my end and if that works that it might be linked to the problem of hotlink 403 errors.
I wasn’t able to relogin to Imgur but fiddling with the configuration settings (or waiting just 20 more minutes while I tried to figure out how to logout) seems to have fixed the issue.
answered May 24, 2016 at 0:00
Possibly imgur does not allow hotlinking, although I couldn’t find any mention about that in their Terms Of Service.
If it does however ban hotlinking, you wouldn’t be able to see picture in another website.
Some services (e.g. Blogger) also did similar thing in the past.
answered May 15, 2012 at 22:17
TschareckTschareck
1,6041 gold badge15 silver badges32 bronze badges
2
Я нахожусь в той же лодке с Greenshot’ Imgur Plugin. Greenshot — это потрясающе.
Согласно документации Imgur
Запрещено. У вас нет доступа к этому действию. Если вы получаете эту ошибку, проверьте, не закончились ли у вас кредиты API, или убедитесь, что вы правильно отправляете заголовки OAuth и имеете действительные токены/секреты.
Я предполагаю, что в моем случае многие другие люди любят Greenshot, и у приложения просто закончились кредиты API или что-то еще? В вашем случае это похоже на сломанный токен аутентификации, хотя я’достаточно осведомлен, чтобы знать, как гипотетически хотя бы приблизиться к его исправлению.
Edit:
ShareX, похожая программа для снимков экрана, похоже, столкнулась с похожей проблемой в какой-то момент, и проблема с их стороны заключалась в том, что пользователи должны были повторно аутентифицироваться. Я собираюсь попробовать это на своей стороне, и если это сработает, то это может быть связано с проблемой 403 ошибки горячей ссылки.
Я не смог заново войти в Imgur, но возня с настройками конфигурации (или ожидание еще 20 минут, пока я пытался понять, как выйти из системы), похоже, решила проблему.
Hi there,
I mainly use imgur to access images linked from reddit. Recently I’ve been getting errors when accessing it, however. It redirects me to a page that says, «Imgur is temporarily over capacity. Please try again later.» with a 403 error. This has been happening consistently for a few days now, except for links to images with «i.imgur» instead of «imgur» in them. This is consistent across different browsers as well as my PC and two different cellphones (so across chrome, firefox, safari, android, Ubuntu, and iOS). However, it only occurs on my home internet connection. Using mobile data / hotspot fixes this issue. It almost seems like imgur doesn’t like my ip address or something.
Any suggestions? I’m imagining that I might need to call my isp or email imgur directly but I’m not sure which is more likely to be successful.
Edit: I emailed my isp about it and they said they were looking into it as others had complained and they were able to reproduce it on their end. I didn’t hear back after that but Imgur seems to be working fine for me as well so they must have done something to fix it I suppose.
Доступ в Имгур был запрещен
Я хочу получить доступ к загруженному изображению, но Imgur API показывает отказ в доступе с помощью 403 error
, С другой стороны, если я скопирую URL изображения и вставлю в новую вкладку, он покажет мне загруженную картинку. Как это понять, я застрял здесь.
1
Решение
Я считаю, что это проблема с пользовательским агентом, или вы можете использовать неправильный URL. Пожалуйста, поделитесь своим фрагментом кода.
2
Другие решения
Других решений пока нет …
По вопросам рекламы ammmcru@yandex.ru
Web-Answers © 2023
Наверх
В Казахстане давно забанен, да и хрен с ним, всё равно отстой
Deleted
(14.04.19 14:36:33 MSK)
- Показать ответы
- Ссылка
Ну ты наверно что-то там перемудрил со скриптами или ещё что.
Просто через браузер попробуй без всяких кучи расширений.
fornlr ★★★★★
(14.04.19 14:39:19 MSK)
Последнее исправление: fornlr 14.04.19 14:42:19 MSK
(всего
исправлений: 1)
- Показать ответ
- Ссылка
Ага, ImgurException тебе тоже РКН отдает.
anonymous
(14.04.19 14:45:40 MSK)
- Ссылка
разбань, не гражданин шоле?
- Ссылка
403
anonymous
(14.04.19 15:19:32 MSK)
- Ссылка
Ответ на:
комментарий
от fornlr 14.04.19 14:39:19 MSK
Ответ на:
комментарий
от bass 14.04.19 14:37:40 MSK
Ответ на:
комментарий
от xDShot 14.04.19 15:45:24 MSK
например так:
xclip -selection clipboard -t image/png -o >$XDG_RUNTIME_DIR/tmp.png
curl -F"file=@$XDG_RUNTIME_DIR/tmp.png" https://0x0.st
bass ★★★★★
(14.04.19 16:18:49 MSK)
- Ссылка
Ответ на:
комментарий
от Deleted 14.04.19 14:36:33 MSK
Как давно? Это важно. Посмотрел в гугле. ТС, ищи другой хостинг.
peregrine ★★★★★
(14.04.19 16:54:17 MSK)
Последнее исправление: peregrine 14.04.19 16:56:00 MSK
(всего
исправлений: 1)
- Ссылка
Можно ещё pic4a.ru, как альтернатива.
Riniko ★★
(14.04.19 17:11:28 MSK)
- Ссылка
Ответ на:
комментарий
от xDShot 14.04.19 15:45:01 MSK
Значит, забанен ты за что-то, или твои соседи по внешнему адресу.
anonymous
(14.04.19 17:25:34 MSK)
- Ссылка
Ответ на:
комментарий
от bass 14.04.19 14:37:40 MSK
Ответ на:
комментарий
от siegment 14.04.19 17:40:17 MSK
Ответ на:
комментарий
от mord0d 14.04.19 17:43:30 MSK
Чего сразу Гитлер-то?
Покуда скастовали, ещё есть transfer.sh и ipfs.pics. Лучше всего на собственном хосте.
- Ссылка
Хостинг так себе. Много мусора. На мобильных платформах для заливки заставляет ставить приложуху, а в ней мучает капчей. Капчу может попросить и если заливать много на десктопе. В лисе в приватном режиме при сохранении изображений они могут сохраниться как html с расширением jpg — за это вообще лучи ненависти. Хорошо хоть URLы из них выдрать можно и скормить JDownloader. Мне больше нравится http://imagebam.com
(14.04.19 18:19:51 MSK)
- Ссылка
У меня открылся, так что видимо не забанен.
torvn77 ★★★★★
(14.04.19 18:23:42 MSK)
- Ссылка
Ответ на:
комментарий
от Deleted 14.04.19 14:36:33 MSK
В Казахстане давно забанен, да и хрен с ним, всё равно отстой
Казахстан.
anonymous
(14.04.19 18:49:09 MSK)
- Ссылка
Ответ на:
комментарий
от Deleted 14.04.19 14:36:33 MSK
Как там в Казахстане реально пробиться в свободный интернет? А в Туркменистане?
(14.04.19 19:41:32 MSK)
- Ссылка
Меня там тоже забанили как-то, хотя у меня с десяток картинок, и аккаунт довольно старый. Написал в поддержку, мол, а что случилось-то? Почему не работает? Ответили, что аккаунт был помечен как подозрительный, поэтому автоматически запрещается загрузка новых картинок. Разбанили.
i-rinat ★★★★★
(14.04.19 19:49:59 MSK)
- Ссылка
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
I have two test URLs:
- deleted image: https://i.imgur.com/JedrSP3.png
- working image: https://i.imgur.com/d1YdgCM.png
I’m trying to do a simple request-promise request to check if this image exists before downloading it.
My test script:
const rp = require('request-promise');
// const URL = 'https://i.redd.it/izxp34ew4nw11.jpg';
// const URL = 'https://i.imgur.com/JedrSP3.png'; // 404 imgur
const URL = 'https://i.imgur.com/d1YdgCM.png' // working imgur
async function main() {
try {
const payload = await testRp();
debugger;
} catch (e) {
debugger;
}
}
async function testRp({ increaseBy } = {}) {
const uri = URL;
const options = {
method: 'HEAD',
uri,
json: true,
};
return rp(options);
}
main();
If you hit the deleted image link, it will redirect you to their image has been deleted or missing
page. The problem here is that if you’re getting it programmatically, you don’t get a status code. You get this:
< { 'last-modified': 'Wed, 14 May 2014 05:44:36 GMT',
< etag: '"d835884373f4d6c8f24742ceabe74946"',
< 'content-type': 'image/png',
< 'cache-control': 'public, max-age=31536000',
< 'content-length': '503',
< 'accept-ranges': 'bytes',
< date: 'Sat, 10 Nov 2018 22:52:05 GMT',
< age: '4336782',
< connection: 'close',
< 'x-served-by': 'cache-iad2145-IAD, cache-yyz8322-YYZ',
< 'x-cache': 'HIT, HIT',
< 'x-cache-hits': '63963, 8479',
< 'x-timer': 'S1541890325.130391,VS0,VE0',
< 'access-control-allow-methods': 'GET, OPTIONS',
< 'access-control-allow-origin': '*',
< server: 'cat factory 1.0' }
and it will seem like it’s fine for you to proceed with a GET
request.
Is there a way to check if the image exists and be guaranteed that the returned status is correct without using the imgur API?