Search code examples
httpwebpostmanhttpwebrequestwebrequest

Can't authorize into Http request


Sorry for my English)

I have an account on https://naurok.com.ua (login: kuz.code.official@gmail.com, password: 2455s1). I log in, then follow the link /test/test-po-filosofii-541029/flashcard.

After I followed the link, it loads the cards through a request /api/test/documents/541029/flashcard.

I need to send it successfully:

введите сюда описание изображения

введите сюда описание изображения

I test request by Postman api/test/documents/541029/flashcard. Request sends with captured Cookies, but it says I need to log in ("Необходимо авторизоваться").

введите сюда описание изображения

Why query work on website but doesn`t in Postman?


Solution

  • you need add the most important thing which is to add the cookie PHPSESSID you can find it on your browser when inspecting the request on network tab like this

    enter image description here

    click on "cookies" on postman

    to have it like this

    cookies

    or click on "code" on postman

    enter image description here

    I noticed also you need referer header otherwise it won't work

    enter image description here