Error in GET method to fetch images (Help)

  • Автор темы Автор темы cesario678
  • Дата начала Дата начала

cesario678

Client
Регистрация
10.03.2022
Сообщения
227
Реакции
13
Баллы
18
I'm trying to make a GET request to retrieve image URLs from Freepik, but I'm using these settings, and it doesn't work at all.

I've already tried this URL:
And I've also tried this one with the API key directly in it:
(I removed the API key for security reasons).
In the Referer header, I tested using Freepik's website and also tried without it.
I set content_only as the standard and also tested other options, but it didn't work.
In MORE, I included this:
Authorization: Bearer MYAPI
I also tested different image options in the project settings, such as standard, alternative, etc., and nothing worked.
Can anyone help?


And I always get an "authorization denied" error.
Sometimes, it says the API key is incorrect when I change the method in the project settings, but I've checked the API key dozens of times, and it still doesn't work.
I've also tested the Pexels API, which has a similar structure, but it doesn't work either. However, the Pixabay API worked just fine.
Can anyone help? Attached are some images.
 

Вложения

  • 111.png
    111.png
    74 KB · Просмотры: 86
  • 222.png
    222.png
    68,4 KB · Просмотры: 95
I guess API-key should be passed in another way, not in URL. For example, in headers with authorization.
 
I guess API-key should be passed in another way, not in URL. For example, in headers with authorization.
Yes, I have already done that. There is also an image there. If you could explain it better and provide more information on how to do it differently from what I have already done, I would appreciate it. I also used ChatGPT Pro to request these functions, and it gave me exactly what I had already done. And still, nothing.
 
Yes, I have already done that. There is also an image there. If you could explain it better and provide more information on how to do it differently from what I have already done, I would appreciate it. I also used ChatGPT Pro to request these functions, and it gave me exactly what I had already done. And still, nothing.
I think you should learn the API more deeply.
Or at least give the example of the request from API documentation.
 
I think you should learn the API more deeply.
Or at least give the example of the request from API documentation.
Yes, I am in the process of learning, and I have already created some, but I am struggling with this one. I added it to the article above, and in the header, I did it just as it appears on the API website, and ChatGPT Pro suggested the same thing, yet it still doesn't work. Here is the header I used."
Se precisar de ajustes ou quiser mais contexto, me avise!
 

Вложения

  • 222.png
    222.png
    68,4 KB · Просмотры: 86
Yes, I am in the process of learning, and I have already created some, but I am struggling with this one. I added it to the article above, and in the header, I did it just as it appears on the API website, and ChatGPT Pro suggested the same thing, yet it still doesn't work. Here is the header I used."
Se precisar de ajustes ou quiser mais contexto, me avise!
You should show API example for authorization request, how it is described in API docs.
 
  • Спасибо
Реакции: cesario678

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)