Imgur

ОПЛАЧЕНО
Verified
От Imgur | Обновлено 21 दिन पहले | Entertainment
Популярность

9.9 / 10

Задержка

1,143ms

Уровень обслуживания

100%

Health Check

N/A

Назад ко всем обсуждениям

Simplest test fails with "Malformed Auth Header"

Rapid account: Aperrien
aperrien
एक वर्ष पहले

Hello, I’m doing a standard test using imgur’s rapidAPI endpoint to just get notifications. With just the basic python test code run from the site without modification I’m getting “Malformed auth header”. I could see getting an error with login credentials, but I’m not getting that. What’s wrong here?

Here’s the example code I was using, with the obvious cropped out:

import requests

url = “https://imgur-apiv3.p.rapidapi.com/3/notification

headers = {
“Authorization”: “My Access Token”,
“X-RapidAPI-Key”: “RapidAPI Key”,
“X-RapidAPI-Host”: “imgur-apiv3.p.rapidapi.com
}

response = requests.get(url, headers=headers)

print(response.json())

This gives me the following response:

{
“data”: {
“error”: “Malformed auth header”,
“request”: “/3/notification”,
“method”: “GET”
},
“success”: false,
“status”: 403
}

I generated an access token from the following tutorial:
https://rapidapi.com/blog/imgur-api-tutorial/

Присоединяйтесь к обсуждению – добавьте комментарий ниже:

Войдите / Зарегистрируйтесь, чтобы публиковать новые комментарии