Created
September 6, 2019 10:25
-
-
Save cristiroma/6099505104f7b6a4753f9028d92ec867 to your computer and use it in GitHub Desktop.
Drupal Log in using cURL command line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SITE="https://www.website.com" | |
USER="[email protected]" | |
PASS="password" | |
# Log in and save session cookies to cookies.txt | |
curl -c ./cookies.txt -L -X POST $SITE/user/login -d "name=$USER&pass=$PASS&form_id=user_login_form&op=Log In" | |
# Make authenticated requests | |
curl -b cookie.txt -X GET $SITE/admin/config/development/performance |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cookies.txt format