I have Drupal 7 installed locally on my computer with the domain set to http://drupal.local.
I am trying to prepare an external script in PHP or Python (or even in pure Bash using curl, if it does not require a lot of extra work), which will successfully execute an HTTP request by default available only for the logged in user.
To understand what such a HTTP request should look like, I am first trying to perform such a HTTP request using Postman, but all my attempts failed.
This is what I've done so far:
- In the browser, I logged in as administrator of the Drupal 7 site
- I opened the browser on http://drupal.local/en/node/add/article and I received status 200 (The page is displayed correctly in my browser.)
- In Postman I set:
- request method on: GET
- URL: http://drupal.local/en/node/add/article
- Headers: I set all headers identically to those in the browser including the current cookies containing the session key with its value
- I don't have access to this page and I receive a 403 error
How do I construct an authenticated HTTP request in Postman that will work for Drupal 7?