Error in GET method to fetch images (Help)

cesario678

Client
Регистрация
10.03.2022
Сообщения
194
Благодарностей
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.
 

Вложения

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 554
Благодарностей
5 940
Баллы
113
I guess API-key should be passed in another way, not in URL. For example, in headers with authorization.
 

cesario678

Client
Регистрация
10.03.2022
Сообщения
194
Благодарностей
13
Баллы
18
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.
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 554
Благодарностей
5 940
Баллы
113
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.
 

cesario678

Client
Регистрация
10.03.2022
Сообщения
194
Благодарностей
13
Баллы
18
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!
 

Вложения

  • 68,4 КБ Просмотры: 4

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 554
Благодарностей
5 940
Баллы
113
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

Client
Регистрация
10.03.2022
Сообщения
194
Благодарностей
13
Баллы
18

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 554
Благодарностей
5 940
Баллы
113

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